Factory test and IFP mode improvements.

Configure bootloader entry pin regardless of test outcome.
In IFP mode, allow serial flash to be programmed from an arbitrary block, rather than always from the beginning.