Fix typos in bitop fns.
Return ids insteads of procs from defn/defmacro.
Enforce definition before use and rearrange core.apr.