rilmodem/sim: pin retry count implementation + minor style etc fixes