(CFACT-59) Add id and gid facts

Given that these two limits are independent of one another, perhaps just a local constant to each function will suffice.