Made default_user_agent reusable

This is not exciting change, but will help for people who wants to change name of user agent alone. Also name can be unicode.
Merge pull request #1779 from kracekumar/patch-2

Made default_user_agent reusable