rotateDeviceAuthenticationKeyIfNeeded

Rotates the device authentication key if policy says it is due, with the routine rotation of rotateDeviceAuthenticationKey (docs/device-authentication-rotation.md). Only runs when the application calls it: nothing in the library calls it implicitly.

Concurrent calls on one instance run one after the other: the second sees the new key's age and returns NotNeeded. Throws what completeDeviceAuthenticationRotation throws.