(a) The court in its discretion, may allow an executor or administrator to resign when it appears that the executor or administrator is not in default in any matter connected with the duties of his trust. The executor or administrator shall pay the cost of the proceeding, and, if the application is allowed, he shall surrender his letters to be cancelled, and his powers as such shall cease from that time forward.
(b) Whenever an executor or administrator dies, resigns, or is removed, if there is a coexecutor or coadministrator, he shall thenceforward exercise the powers and perform the duties of the trust; and if all the executors or administrators die, resign, or are removed, administration of the estate remaining unadministered shall be granted to those next entitled, if they are competent and qualified.
(c) The surviving or remaining executor or administrator, or the new administrator, as the case may be, is entitled to the exclusive administration of the estate, and for that purpose may maintain any necessary and proper action or proceeding on account thereof against the executor or administrator who has ceased to act, or against his sureties or representatives.