run ray stop before ray tests started (fix ray memory test fail issue) (#3193)
run ray stop before ray tests started (fix ray memory test fail issue) (#3193)

* run ray stop before ray tests started

* add more ray stop

* fix ray memory issue

* change scope to class

* change mxnet scope to function
yangw1234/BigDL,intel-analytics/BigDL,yangw1234/BigDL,intel-analytics/BigDL,intel-analytics/BigDL,yangw1234/BigDL,intel-analytics/BigDL,yangw1234/BigDL