added forwarda and forwardb to caffe phases
cleaning up memory data code a little bit.
bug fix in memory data layer - allow less than 4 tops