Change Entities encode/decode order

Issue #49 
Fixes behavior described in [this comment](https://github.com/YorickPeterse/oga/issues/49#issuecomment-63293716)