[Core] Allow Target and Error elements to be read from MSBuild project

Allow Target elements in an MSBuild project to be read:

  <Target Name="MyTarget" BeforeTargets="PrepareForBuild">
  </Target>

Allow Error tasks inside a Target element to be read:

  <Target Name="MyTarget" BeforeTargets="PrepareForBuild">
    <Error Condition="!Exists(MyTargets.targets')"
      Text="$([System.String]::Format('$(ErrorText)', 'MyTargets.targets'))" />
  </Target>
[NuGet] Update EnsureNuGetPackageBuildImports target in project file.

Fixed bug 21865 - Build fails after updating Xamarin.Forms NuGet
package
https://bugzilla.xamarin.com/show_bug.cgi?id=21865

When adding a NuGet package that uses custom MSBuild targets file to a
project in Visual Studio the project file has an extra Target added
that checks that the MSBuild targets file exists.

  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    <PropertyGroup>
      <ErrorText>This project references NuGet package(s) that are missing on this computer.
Enable NuGet Package Restore to download them.  For more information, see
http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
    </PropertyGroup>
    <Error Condition="!Exists('packages\Xamarin.Forms.1.2.1.6229\build\portable-win+net45+wp80+MonoAndroid10+MonoTouch10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Xamarin.Forms.1.2.1.6229\build\portable-win+net45+wp80+MonoAndroid10+MonoTouch10\Xamarin.Forms.targets'))" />
  </Target>

When the project is opened in MonoDevelop or Xamarin Studio, and the
NuGet package is updated or removed, the Error task is not updated
and results in a build error being reported since the old .targets
file no longer exists.

Now when updating or uninstalling a NuGet package that uses an
MSBuild .targets file the EnsureNuGetPackageBuildImports target is
checked and if there is a matching Error task for that .targets file
the Error task is removed. If there are no remaining Error tasks after
this removal then the EnsureNuGetPackageBuildImports target is removed
too. If there are other Error tasks remaining then the
EnsureNuGetPackageBuildImports target is left in the project file.
This prevents build errors after updating or uninstalling the old
NuGet package from the project. Note that Xamarin Studio and
MonoDevelop will not add an EnsureNuGetPackageBuildImports target when
adding a NuGet package that uses an MSBuild .targets file and will not
add Error tasks to this target.