refactor states-handling of CuDNNDropout
refactor states-handling of CuDNNDropout

Summary: CuDNNDropout used to append the CUDNN states structure on top of the mask blob. This is a bit controversial, and also caused problems when the mask-blob was released by dynamic memory management. This diff makes that states-blob a separate blob managed outside the inputs/outputs (so that we don't need to have different signature for CUDNN and non-CUDNN op). Since Gradient op needs to access the same states, it will grab the states blob based on the mask blob name. Perhaps not the most cleanest way to pass information, but at least better than the previous model. Also could remove a fair amount of code.

Reviewed By: bddppq

Differential Revision: D5787039

fbshipit-source-id: d95f0ffafb5fb2a6a7ce46f4a855e9c1b9a47f52

davinwang/caffe2,xzturn/caffe2,caffe2/caffe2,davinwang/caffe2,xzturn/caffe2,pietern/caffe2,xzturn/caffe2,xzturn/caffe2,Yangqing/caffe2,davinwang/caffe2,davinwang/caffe2,sf-wind/caffe2,sf-wind/caffe2,pietern/caffe2,davinwang/caffe2,Yangqing/caffe2,pietern/caffe2,sf-wind/caffe2,xzturn/caffe2,pietern/caffe2,sf-wind/caffe2,pietern/caffe2,Yangqing/caffe2,Yangqing/caffe2,sf-wind/caffe2,Yangqing/caffe2