Headersfirst8 improvements

I've been developing these improvements in parallel with headersfirst8. It's not yet optimised for use with earlier blocks (which were small enough to download in batches of 500 each), but that will be coming shortly. Raising the pull request so that people can view and comment on some of the changes.