move withResource and askOracleWith both inside ghc function

The idea is to make sure that 'ghc' works the same way across all
calls, automatically handling recompilation checking and resource
contention.