merge revision(s) 39697,39701,39716,39740,39751: [Backport #8069]

	* win32/file.c (rb_file_expand_path_internal):  Expand home directory when
	  used as second parameter (dir_string).  [ruby-core:53168] [Bug #8034]

	* test/ruby/test_file_exhaustive.rb: add test to verify.

	* win32/file.c (get_user_from_path):  add internal function that retrieves
	  username from supplied path (refactored).

	* win32/file.c (rb_file_expand_path_internal):  refactor expansion of user
	  home to use get_user_from_path and cover dir_string corner cases.
	  [ruby-core:53168] [Bug #8034]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e