Allowing Insert or Update (Upsert)of a Record Using an External ID.

api docs on using Upsert
https://www.salesforce.com/us/developer/docs/api_rest/Content/dome_upsert.htm
Refactored upsert and functional tests