Close temporary objects after closing persistent objects

Plugin is one of persistent objects. It may use temporary objects. If
we close persistent objects before closing temporary objects. We can't
use temporary objects in plugin finalizer.
Merge pull request #207 from groonga/close-temporary-objects-after-closing-persistent-objects

Close temporary objects after closing persistent objects