Implement an automatic unloading mechanism

The AutoUnloadPool tracks UR objects that are loaded during its lifetime.
When it goes out of scope, it unloads them.

Change-Id: Ie9b97e8033ef0e019409de05622b18e44638a1b3
Add docs for UR::Context::AutoUnloadPool

Change-Id: I1a587abb704cb4f625f866f9ae044c5d0373df89
Mention AutoUnloadPool in the docs where it talks about unloading

Change-Id: I1cf08bba364c0b852abadd0025d0b4de791adca0
typo

Change-Id: Ia24ccb69440de1ff487e41da8d814596904d28b5
Forgot to use Scalar::Util

Change-Id: Ieba6a23c8068d5a233d7372797c56e66565eac77
Don't add meta objects to the pool

We don't really support unloading classes, so don't add things like
Class objects or Properties to the pool.

Change-Id: Icd71081a489308f7a49e409eaad8db87d59ab6b6
After the pool is drained, invalidate yourself

Change-Id: I31c0a6f93c2af0e582aa0b2c3ff8fc5d1eade15a
Report what happens when memory debugging is turned on

Change-Id: Ia186f43a997976ee5329f4d72cee06ef0c34503c
Merge pull request #24 from nnutter/master

fix prune_object_cache skipping last block of serials
Merge branch 'master' into autounload
Move is_prunable() to UR::Object and use accessors

Change-Id: Idfa0624557d209567333a07f021a23ac9ed80d27
Use the new is_prunable() as the test for adding to the pool

Change-Id: I8030eef55f1fc908dd033f4e7d4615aacfe573e3
Avoid false-positive by checking if is loaded first

Change-Id: Ib8ac253c09fe112cc35dde61208f0a8d3b0111d4
Use a hash slice on the object cache instead of is_loaded()

This speeds up releasing by about 60%, and is also about 15% faster
than an alternative Pool implementation where it used a listref to
store references to objects.

The array version (surprisingly) used more memory.  Hash key strings are
shared within the process.  Since the Pool keys are the same as those used
by the object cache (class names and IDs), they don't take up any additional
memory.

Change-Id: Icd8da23d80d100a49cdcec4e8c5ca16ed86cc141
Merge pull request #23 from amb43790/autounload

Auto unload
Extract method to get the singular name for an is_many accessor

Change-Id: I15d33e4950d4b9834b11b541ede1c27f5af4c41f
extract method to get the iterator name for an is_many accessor

Change-Id: Id684505734fcfc1601dbfcb0e6f9c7c355860f76
extract method to get the set name for an is_many accessor

Change-Id: Iae66ece3c0ebf85ad9bb42d17b817400edda7ca1
extract method to get the rule name for an is_many accessor

Change-Id: I11be47a0909b9d10f9fc0fc20800168c9921a6ee
extract method to get the arrayref name for an is_many accessor

Change-Id: Ie6fedfe57884ac62f9f5f9d84abb270f94a5bbcb