Vortex avalanche in gold-coated and finite-sized MgB2 thin films