Update PInvoke addin sample.

Update project to target .NET 4.5
Change output folder to AddIns\Samples\PInvoke
Add nuspec file for generating NuGet package for
AddIn Manager version 2
Fix PInvoke context menu not displaying in text editor.
Set target CPU to AnyCPU where possible.
Fix some compiler warnings.
Don't show the context action popup when the caret is outside the editor boundaries
Fix .NET 3.5 Build Worker: use x86 target platform as the .NET 3.5 runtime does not support AnyCPU (32-bit preferred)

Use .NET 4.0 Build Worker for Tools.build.
Fix crash in ConvertIfToSwitchAction when there are nested if statements.