Finished implementation of record types.

Also:
- Heavily refactored code handling record types to extract separated functions.
- Remove redundant method Record.extend_type since it'd effectively proxy Record.create_type