Refactor|Cleanup|libdoomsday: Added base class for definition records

Various types of definitions have a number of common methods, such as
order(), so having a base class for the accessors is appropriate.