Format app references as XXX-XXXX

* Where the reference would be shorter than seven digits, it's padded
  with leading zeros.
* Case, formatting, and transcription errors (O for 0 etc.) are handled
  when unobfuscating, so that 1bqhmcm, 1BQ-HMCM, and lBQ HMCM all work.