Split Record class between RecordBuilder and immutable Record interface

Records get passed around the application quite a bit, and being mutable
can create a number of subtle bugs.

In this way, you can create new Record instances with Record.builder() and trust
that created Records will not be changed by other components.

Other changes:

- Record fully extracted from Resource class to avoid confusion between two classes:
  Resources have a global identity, and have a Record as a value.

- The FormClass id of a record is no longer treated as just another property, now
  accessed through getClassId()

- Record is now a FieldValue, so no need for superfluous SubFormValue