Case insensitive unique uri names

This PR is for REVIEW ONLY - DO NOT MERGE!

I'd like to start a discussion around the use of the UriName model, specifically the required coupling between the User & UserGroup resource models. Of particular note is the second last commit as it increases the complexity of setting the factory associations and is mostly a stylistic one. Perhaps we can just use the automatic build code that Ed had originally? 

Thoughts appreciated.