Add an __intcap_t, which is analogous to intptr_t and can store
capabilities.
Fix casting pointers to __intcap_t.