Fix periodically failing test

By using `elements` on only legal elements instead of using `such-that` and
hoping to find a legal element within the allowed number of attempts, there is
no longer a risk of the tests for the Affine Cipher failing to find a proper
key.

This fixes issue #1.