Fix History Support middleware to work with baseURL.

This was broken when history support was split out into its own middleware.
Only use HistorySupport middleware when config has history or auto.
Merge pull request #1564 from rwjblue/fix-history-with-base-url

Fix History Support middleware to work with baseURL.