Brazil has gone from an impressive economic boom to the worst crisis in its modern history in less than a decade.