Also add some helper macros for PROTECT/UNPROTECT that check for IMMUTABLE. These checks are needed for nearly any use of PROTECT/UNPROTECT.