Fix a couple minor build problems.
Update logic for dealing with relationships in order to support the external id lookup feature of the Salesforce API. The new logic is more dynamic and serialized related objects based on the content of the related object. If the related object has an ID then just the id is sent. Otherwise the whole object is sent.