fixed bugs introduced with type_alike

didn't notice I got rid of tar_type/cur_type, and this caused errors with
VECTOR_ELT.  additionally, R started crashing after that; can't tell whether
problem is with my code still, or just a weird state R got in as a result
of the original bug that isn't reset by the new fixed code w/o restart
added explicit test vs machine eps
highlighting nasty memory bug
fixed hard to reproduce memory bug

Not entirely clear if the fix had anything to do with me directly,
or with moving to OSX 10.9 from 10.8.5, and from R 3.0.3 to R 3.1.1 in
my desperate attempt to install valgrind, which btw didn't seem to show
any issues at all with the original code