Change the way resource and uri values are serialized.

* Use anyURI data type on both resource and uri values.
* Add unambiguous resource ID for resource values.