Allow optional configuration of the pruneThreshold for releasing multihandles.

See #832.