added thread safe tests

Peter wrote some threading tests for shopify_api, they didn't end up being useful because the thread safety patch didn't make it into the latest version of AR. I ported his tests here because we have some thread safety code built into shopify_python_api. Its far from a full coverage of threading but its a start.

plz review (contains whitespace fixes, use ?w=1)
@peterjm @dylanahsmith