strengthen priority tree code and add tests

The priority tree codes has been strengthened to handle some new
corner cases.

- Handle setting the parent to itself.
- Handle exclusive reprioritization to the root stream.
- Handle reprioritization to stream dependent of stream being
reprioritized.

In addition, split out the adjustment function so that it can be
tested independently of the serverConn and add tests.
Merge pull request #24 from DanielMorsing/priority

strengthen priority tree code and add tests