codegen: Support shared byte arrays

This is the codegen piece of the shared byte array support. This is
relatively straightforward - it simply prepends our existing constants
with the special "shared constant" refcount.