Fixed a bug in PairwiseDistance where the gradInput table isn't converted when Module.type function is called (this bug has always existed and is not due to the recent changes).