add better error messages for non-functions as middleware

Only functions are supported for [VERB](path, fn), use(path, fn) and
all(fn) calls in Router and Routes. This catches those errors earlier to
avoid checks during actual request processing.