Thames Water faces bankruptcy after stalemate with regulator