Fixed get parameters for partial parameters

Added a test for getParameters

Ensured gradients are also flattened

removed a failing test

removed spurious comments

ensure that a type is passed to Module:type()
Merge branch 'topic_getParameter' of github.com:jameskirkpatrick/nn into topic_getParameter