Ensure a C-contiguous input

Both ImgActs and WeightActs require hidacts to be C-contiguous, but it is not guaranteed in code. This could lead to runtime exception.
enforce gpu_contiguous in imgacts & weightacts
Merge pull request #1221 from ppwwyyxx/patch-1

Ensure a C-contiguous input for ImgActs
additional modification on sandborx/rnn