programmer: change log interface

Assemble log message in block to avoid unnecessary work when the message
is not shown anyways.
programmer/register: fix offsets for #replace!
programmer/kinetis: don't always halt the core on init
programmer/adiv5-ap: use mem-ap BD regs to improve speed
programmer/armv7: add #halt_reason
programmer/gdbserver: report proper halt reason