load middleware

The `middleware` variable is getting initialized _after_ the `duotest()` function is getting evaluated because of this:

- `lazy()` is getting called above `program.middleware`
- `lazy()` calls `duotest()`, which calls `var mw = middleware || function(){}`, but `middleware` hasn't been defined yet.

This PR makes it so `middleware()` resolves correctly.