Phase transitions in nonlinear filtering