Refactor macros in ledger-context.el to byte compile cleanly

For @enderw88's approval. :-)