Green’s J-order and the rank of tropical matrices