The rank of random matrices over finite fields