add 1D pack/unpack
Merge branch 'dev' of ssh://github.com/tqchen/mshadow into dev