Make collection field of ReferenceField optional.

Currently, there is no way to represent the reference to itself.
This patch makes collection field optional. The reference field without
collection field will be treated as raw object id.