Fixed a crash bug when flattening models with roles and serializables.

The default behavior with flatten is to exclude serializables (as the main use-case
for flatten is redis hashes and serializables can be derived from other data).
This bug showed itself when you mixed roles with serializables as filtering
by role forgot to exclude the serializables.
Update Serializable to accept serialize_when_none option
Merge remote-tracking branch 'jokull/master' into jokull

* jokull/master:
  Fixed a crash bug when flattening models with roles and serializables.
Merge branch 'serializable-when-none' into jokull

* serializable-when-none:
  Update Serializable to accept serialize_when_none option