Latest changes to the URI

I've periodically made some updates to the URI code over the last months (including the fixing errors related to the Boost.Optional situation). I'd appreciate it if you'd check and merge these changes, @deanberris.