Make tag replacement asynchronous.
Move endpoint and resource providers to middleware plugin.
Decouple endpoint and resource providers from middleware with ResourceContext.
Fix ignorant tag replacer circular replacement bug.