expose Closeable, top-level apis via ContextBuilder.buildApi()

issue #1501: allow Closeable, top-level apis to be used as opposed to RestContext