Re-land r329273: [Plugins] Add a slim plugin API to work together with the new PM

Fix unittest: Do not link LLVM into the test plugin.
Additionally, remove an unrelated change that slipped in in r329273.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329293 91177308-0d34-0410-b5e6-96231b3b80d8
10 files changed