Fix small leak at start of updatePolicy(). Fix leaks in existsPolicyForKey() and add error.
Add argument checks for enforce_roll() and set_roll().
Add argument checks for key_for_conf().
For youngestKeyForConfig(), add argument checks, plug memory leaks, add check for repository.
For setnextroll(), add argument checks.
For getLastReusableKey(), add argument checks, plug leaks and make it C.
For keytag(), add argument checks, plug leaks and make it C.