Implement the reference type for DB field.

The reference field is to reference a document. This field will store
the object id of the document.
The getter of the reference type field returns the future of document.

A convertToFieldValue method is split because it exceeds the maximum of
cyclomatic complexity.

And this patch adds three examples for reference type.