Get reshape functions working, add tests
Merge pull request #644 from JuliaStats/reshape

Get reshape functions working, add tests