Add further type hints to `synapse.storage.util`.