Large update. Faster, more accurate measurements.

Found an error - example code was incorrectly preloading the BAR_IN
registers (not needed). Fixed lots of polling issues. Removed hard coded
register reads and hex writes. A lot more portable now.