add milestones middleware

This allows a user to specify a milestone middleware file, to
consolidate all milestone specific behavior for e.g. an api version
to a single file.