Number of changes to URI code:

* Turn example into more stricter unit test.
* Use boost::optional for optional value types.
* Phase out visitor pattern class for more straightforward result structs.
* Use std::numeric_limits and boost::lexical_cast
* Try to flatten code and unindent wherever possible.