Thread safety

The match function is not thread safe. Match.getInstance currently returns a global singleton. I have ensured that the MatchHolder is now ThreadLocal. Tests provided.