RFC: Fix to broken vec routine

In the master branch, calling `vec` leads to

```
julia> vec(eye(10))
reshape: invalid dimensions
 in reshape at array.jl:128
 in vec at abstractarray.jl:152
```

due to the current definition of `vec` calling `reshape` with the wrong parameters.  The changes in this pull request fix this and add tests related to `vec` as well.