Fix OneToManyField, simplify OneToOneField

The methods `Factory.build` and `Factory.create` misbehave when a
`OneToManyField` is involved. For example, the following both raise exceptions:

    entities.Filter(role=N, permission=[X, Y, Z]).build()
    entities.Filter(role=N, permission=[X, Y, Z]).create()

(For the above example, you'll need to fix up `Filter`, the letters above all
represent numbers. Just follow the example.)

Attempting to fix the above exceptions as-is is challenging, because the
implementation of `OneToManyField` is highly complicated. Thus, do the
following:

* Greatly simplify the implementation of `OneToManyField` so as to be much more
  comprehensible to mere mortals.
* Simplify the implementation of `OneToOneField` so that it is highly similar to
  the implementation of `OneToManyField` - and therefore easy to understand.
* Update the set of unit tests for methods `OneToOneField.get_value` and
  `OneToManyField.get_value`.

With this done, also fix up the implementation `Factory.build` to properly deal
with `OneToManyField`s.
Fixed few more UI tests
Merge pull request #1216 from sghai/fix-test

Fixed few more UI tests
Merge pull request #1220 from Ichimonji10/one-to-n-field

Fix OneToManyField, simplify OneToOneField