Her decision to resign comes after months of chaos in Parliament and speculation that she was about to be forced out.