Merge attributes into hash before extends, child and glue.
Fix bug causing MultiBuilder#to_a to include non-root level engines.
Fix failing specs.
Set Oj to use `#to_json` by default.

Fixes #584.
Merge pull request #588 from DouweM/read_multi-fixes

Fix issues related to read_multi and Oj