Implement DHT Merging

The current way multipass works, write_scan_header() seems to be called multiple times, so only DC tables get merged, however, this will still merge AC tables if possible.

Implements the second half of #30.

If we only call `write_scan_header()` once, it will be merged in one DHT. I am not familiar enough with the multipass code in `jcmaster.c` to say how to enable this to happen. Maybe @fbossen knows that code better than me.