Tests and applications of nonlinear force-free field extrapolations in spherical geometry