Bulgaria’s government has resigned as mass protests gripped the country just weeks before it’s due to join the eurozone.