DRY up implementations of LDW and LDB

The LD higher-order function returns a load function for a given byte
width.  It checks preconditions, then calculates the effective start
memory address for data of the given byte width, then loads the
sign-extended data into the specified register.