Add "debug attachments" console command to allow highly verbose attachment logging to be switched on and off.

Default is off.