Prime minister of Yemen's internationally recognised government has resigned amid political turmoil.