Move bernoulli_() to DistributionTemplates (#38558)
Summary:
resolve the feature introduced in https://github.com/pytorch/pytorch/issues/37373
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38558
Differential Revision: D21920685
Pulled By: pbelevich
fbshipit-source-id: 50c77d9aaa334b3276a2352afe6c4ad03f12be31