MODE-1950 - Updated the REST service so that mixins are removed only after properties & children have been processed. 

Also, implemented a type conversion mechanism so that JSON primitive types are correctly converted to JCR Values, as opposed to always being strings.