The military says it has ousted and arrested long-time leader Omar al-Bashir, after months of protests.