Move tests_py_htm to nupic.core and refactor integration tests