[bug 849480] Simplify get_next_url.

- Improve test coverage of sumo.utils.get_next_url.
- Simplify implementation, since we no longer need to implement
  is_safe_url ourselves.
- Drop untested semantics/checks, like LOGIN_URL.
- Early returns are nice and clean.