Addition of threading

Associated with https://github.com/emonhub/emonhub/issues/66
These are the changes required to add threading. Il try and write it up next
The if ((time.time() - lastposttime) > 5.0): part here was an option to create a minimum post time that data could be dispatched but perhaps something to think about in the future.