Add serialize method for Model

Override the serialize method when server wants something other than a JSON representation of the attributes. Allows developer to avoid having to override the sync method. It should be considered the inverse of the parse method.