Rework of rank commands

Here is the final version of the /f rank, rework.
I hope I got everything this time :D
(I also squashed a bug when demoting the leader)