Support using URL with wildcard as the app's cname (fix #782)

Tests were updated accordingly
Merge pull request #824 from scorphus/i782_cname_wildcard

Allow using URL with wildcard (*) as the cname for the app