GL fixes and Python improvements

f9c0436 fixes a bug where, if the captured application uses glUniform* to set global uniform values while capturing is idle, these will be ignored in the capture. Since the program state is not sampled when capturing starts, the easiest way was to serialize to the program record as if they were glProgramUniform*, for which this case is already handled.
71b1031 reduces the overhead of spawning threads on every trace callback, which is called on every new line, new scope, call or return, and also highlights the line where an exception occurs.
You can see how it changes by running:

    r = range(1, 100000)
    r[87933] = 'a'
    for i in r:
        if i >= 87930:
            print(i + 1)