enhance options.middleware to pass the default middleware as an arg

- modified options.middleware to accept an array or a function

- modified the arguments sent to the options.middleware function to
  include a third argument that is the array of default middlewares

- added unit tests for https use cases and new options.middleware
  use cases

- refactored unit tests and the test case configs in Gruntfile.js to
  use a sequential set of TCP port numbers, starting at 8000,
  for clarity