Enhance record and recarray support

- Fix #712 alignment issues on GPU
- Handle dispatching of recarray type

Hmm... can you explain why we need to keep a cache?