Move a bunch of functions to a new source file and rename some of them for consistency. No functional changes. llvm-svn: 226673