Improve sip parser.

* Fixes get_peer_tag funky behaviour.
* Moves tests into respective source files when possible, adds new
  tests.
* Whitespace cleanup.