Fix poorly-defined mock

The `alarmsdb` mock should require the `alarm` module with the same
technique that the true implementation does (in order to facilitate
issues with cyclic dependencies).