Exactly solvable models and bifurcations: the case of the cubic NLS with a δ or a δ′ interaction