add: Allow caller to supply unique reference.

Being able to specify reference is useful to ensure consistency
during upgrades in a cluster of IdP:s.
add: Add assertion of uniqueness to last commit.
Merge pull request #59 from fredrikt/master

add: Allow caller to supply unique reference.