Fixes for record type typecode caching, and additional tests (attempt 2)

A continuation of the work/discussion from https://github.com/numba/numba/pull/879, using a dict to cache keys instead.
> Scratching my head a bit more... Dispatcher_Insert() is also called independently by Dispatcher.compile(). At this point it can't know any values corresponding to the given typecodes, so it doesn't know which keys to use for a typecode cache insertion.

`Dispatcher._compile_for_args()` knows both the typecodes and the values corresponding to the given typecodes, so perhaps it could call back into `_dispatcher.c` to do the typecode cache insertion, just after calling `Dispatcher.jit()`?