Optimize batch training further.

On a 768x1000 CD-1 batch update only takes twice as long as theano-cpu
with me, which is roughly 25x increase to previous version. This is
achieved by inlining JBlas calls and type hinting.