iprop locking changes to fix deadlock

These four commits eliminate the ulog lock in favor of the database lock and ensure that all ulog accesses take place under a lock.  (The first commit in the sequence is pull request 47; it's necessary for this branch to work.)