Use temp session for WT_SESSION->compact

Because compact doesn't work inside a transaction
This fixes jstests/replsets/maintenance.js