pin tool rewrite, now with thread support

Some parts are sketchier, but seems to work now.
BTW this happens on thread test but it appears to work anyways.
```
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 811, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 764, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/ryan/Desktop/qira/middleware/qira_program.py", line 628, in analysis_thread
    self.picture = qira_analysis.get_vtimeline_picture(self, minclnum, maxclnum)
  File "/home/ryan/Desktop/qira/middleware/qira_analysis.py", line 337, in get_vtimeline_picture
    c = int((trace.dmap[i]*128.0)/trace.maxd)
IndexError: list index out of range

Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 811, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 764, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/ryan/Desktop/qira/middleware/qira_program.py", line 628, in analysis_thread
    self.picture = qira_analysis.get_vtimeline_picture(self, minclnum, maxclnum)
  File "/home/ryan/Desktop/qira/middleware/qira_analysis.py", line 337, in get_vtimeline_picture
    c = int((trace.dmap[i]*128.0)/trace.maxd)
IndexError: list index out of range

Exception in thread Thread-5:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 811, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 764, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/ryan/Desktop/qira/middleware/qira_program.py", line 628, in analysis_thread
    self.picture = qira_analysis.get_vtimeline_picture(self, minclnum, maxclnum)
  File "/home/ryan/Desktop/qira/middleware/qira_analysis.py", line 337, in get_vtimeline_picture
    c = int((trace.dmap[i]*128.0)/trace.maxd)
IndexError: list index out of range
```