Use globalKeyMapper in serialization process too (toDictionary / toJSONString)

I noticed that the globalKeyMapper wasn't used when turning models into JSON dictionaries or strings. 
This seems essential when using REST APIs and sending JSON body PUT or POST requests.