Added 'derivp' flag to CARTSTATE

Checks if state class object is a derivative, so that derivative slots
aren't calculated if it's bound