msan as most sanitizers creates a new function to initialize itself,
which function passes cannot do. To keep it as a function pass, I moved the
pass's intialization around:
- Make a free function for creating the global constructor function
- The opt tool calls this function when passing a command line option
- The remaining initialization only creates function declarations and metadata. This I now do lazily when visiting the first function. Consequently I need to keep state in the Pass, which is unfortunate. If this survives review, we need to be careful with other sanitizers when doing this, because state is kept per PM instance, _not_ per module. So this is just best-effort.