Essar Oil deal to pull StanChart out of loan mess