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 3 minutes and 28 seconds (queued for 1 second)
latest
Status Job ID Name Coverage
  Build
passed #1278737
build

00:02:45

passed #1278742
build_android

00:00:55

passed #1278738
build_clang_libcpp

00:03:28

passed #1278741
build_clazy

00:03:11

passed #1278740
build_mingw64_fedora

00:02:22

passed #1278739
build_ubuntu_16_04

00:01:44