enhancing toJSON and toObject to pump out cached relations, optionally

I was finding it a little difficult to deal with getting my cachedRelations out to my api. 

Here's an enhancement to toJSON / toObject to copy the relations onto the data object that gets output.