Support virtual hosting with custom domain.

This pull request for supporting virtual-hosting with custom domain #1035 , and also fix bug #1036 .
For backward compatibility, it check new paraeter "support_customdomain_for_bucket" is true.