internal/router: do not always resolve ids

When there's a PUT or a POST, we might actually be
creating a new entity, so defer id resolution
in that case so the specific handler can
deal with it.

For POSTs and PUTs to metadata, the id must already
exist, because otherwise there could not be
metadata about it, so we always resolve in that
case.