spec: Unit tests for key id formatting.

Ensure the bug @janschumann encountered in the old implementation of
apt::key is never accidentally reintroduced.