Make ui-sref and $state.href url generation html5mode aware

Urls generated by ui-router never included hashbangs. This is expected
behaviour if Hmtl5Mode is enabled. However, if Html5Mode is disabled,
than, urls like this /base/path/generated/url generates 404 on page
refresh/direct access. Urls generated should be like
/base/path/#/generated/url/

This commits adds this feature, sample/index.html updated to show a
demonstration about usage.

We can't determine Html5Mode from locationProvider, because after we
read, status may change, so it needs to be explicity set to ui-router.

This is also linked with issue269, created by me. https://github.com/angular-ui/ui-router/issues/269