fixes an important bug in backpropagation of JointNN; and implement a RNN
add test of RNN