exception Bad_format now takes a backtrace list to preserve through re-raising

Also turns on debug, backtraces are only dumped when Bad_format is re-raised
Backtraces are only printed if backtraces are turned on

Initially this was used to track debug a parsing bug with `build-env` but the recent parser clean-up seems to have solved that issue.