SPV Bitcoin - v2 - added topblock and related data.

automatically tracks cumulative difficulty; able to quickly and simply
set appropriate topblock.

also added some common functions for copy-pasting.

Made the search for parent and self go backwards so it's very cheap to
add to the end (most of the time the parent block will be the most
common block)