CDK-644: Move URIBuilder to the API.

This also adds new methods to URIBuilder to make it more user-friendly.