BUG: make set_state and get_state threadsafe
Merge pull request #5388 from sturlamolden/mtrand-bugfix-threadsafe

BUG: Make RandomState.set_state and RandomState.get_state threadsafe