Use App.base when there are no requests to generate URL's

Setting App.fullBaseUrl to a non-host value causes issues generating URL's in a web context. However, not including the base path generates incorrect URL's in a CLI context. This change allows the use of App.base to populate the base path which is used as a fallback when there are no requests, or when the base path is empty.

Refs [2931](https://cakephp.lighthouseapp.com/projects/42648/tickets/2931-htmlhelperimage-does-not-work-from-within-email-templates)