Added function rpin

function to generate fake pins.

Note that some unit tests are based on statistical tests rather then deterministic ones. chosen confidence values etc are chosen to avoid too many unwanted test fails but it might happen that a test can randomly fail sometimes even though it works in the long run.