Thurrock council poured taxpayers' millions into energy company that used cash to set up credit business