middleware: move RemoveContextMiddleware() out of context

Signed-off-by: Alejandro Mery <amery@geeks.cl>