Use logging in server startup; also fix notify API call to check keys

Use the same logging to produce output in during server startup as during operation.

**Also** implement `SomeForeignKey` wrapper type and constructor function and use it to check `notify` API calls and return an `UnknownKeyError` if the client supplied nonsense.