Make $dialog 'resolve' property to work the same way of $routeProvider.when

Changing the $dialog service to treat the 'resolve' property the same way as $routeProvider does. It means expecting a string or a factory function instead of a value.

Signed-off-by: thiagofelix <felixthi@gmail.com>