record: add casting functions for record type
record: add casting functions for record type

Implement cast and const_cast functions for record
type, input, output and gate.

Signed-off-by: Helge Bahmann <c5618920f622561f9c0ec5c42219c4c08180149f@chaoticmind.net>

phate/jive,phate/jive,phate/jive