Factored out target creation logic to separate functions.

Care was taken to avoid dependencies on the host of
command line globals.

std::string should probably replaced by llvm::StringRef
in some places.
Do not optimize for host CPU by default.

GitHub: Fixes #323.
Merge pull request #341 from klickverbot/default-target-cpu

Use generic target CPU by default