Add test for marshalling joinData.
Add doc blocks for type constants.
Update tests for joinData marshalling.

You have to include the joinData as part of the associated data for it
to be marshalled.
First pass at implementing _joinData marshalling.

Refs #2511
Fix marshalling nested associations inside _joinData.

The _joinData entity could have additional associations that we should
also be able to marshall.
Fix coding standards errors.
Merge pull request #2547 from markstory/3.0-joindata

3.0 Make marshaller convert `_joinData` into entities.