[ms.build] Do not try to release threads upon finalization.
[ms.build] Fix bug #20961 - add KeepDuplicates etc. to 4.0 as internal.

Since NET_4_0 and NET_4_5 share the same ToolsVersion (4.0) there seems no
way to distinguish the appropriate framework .targets file, so I ended up
to add the missing members as internal for 4.0.
[ms.build] add some cyclic dependency related tests (some are not working).