Brazilian police say they have foiled a bank heist plot in which would-be thieves dug a 500-metre tunnel to a Sao Paulo branch of government-owned Banco do Brazil.