Fix for reshape2:::dcast segfault - issue 31

This is a fix for https://github.com/hadley/reshape/issues/31.
Note: I dint write any of this code. 'split-numeric' is written by Hadley and changes to 'RcppExports' are taken from Romain's code from 'dplyr'