lots of melt_dataframe stuff

- rewrite melt_dataframe.c to better handle memory
- more tests
- handle factors as value vars