Handle LinkAction objects by std::unique_ptrs

This clarifies the object ownership, and fixes various memory leaks.
6 jobs for robustify-linkaction-memory-handling in 4 minutes and 33 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Build
passed #1038121
build

00:03:47

passed #1038126
build_android

00:00:45

passed #1038122
build_clang_libcpp

00:04:32

passed #1038125
build_clazy

00:02:40

passed #1038124
build_mingw64_fedora

00:02:11

passed #1038123
build_ubuntu_16_04

00:01:25