Revert the change in d2cea6818c5bdecef3a9426d198c9a9103b3a083. The
problem is that weak event pattern can't be used when running from
command line.

The fix is to check the event sender instead.
Also, added assert to prevent using weak event pattern in command line.
Fix of issue 4051: Nuget.targets broken on mono xbuild

- Don't use property functions on mono xbuild since they are not supported.
- Also, replace <Choose> since again, it's not well supported on mono xbuild.
NuGetPackageImportStamp project property
Make sure that when both packages.project.config and packages.config exist,
PackagesConfig should be set to packages.project.config.
Fix of work item 4050: push does not follow redirect.
Add unit test for issue 4050 (push to server does not follow redirection).
Tweak to unit test
Add unit test for the bug that "nuget.exe push" will retry forever
instead of asking for user's password when NuGet.Server uses Windows
Authentication.
Tweak to unit test
Added an extension method to make it easy for to restrict an IQueryable<IPackage> to the latest version. Handy when consuming NuGet from an application that can't use Linq directly.
Fix unit tests
Increase the timeout value in test PushCommand_PushToServerWontRetryForever
Fix the performance problem in nuget.exe install.

The problem is that nuget.exe gets all versions of a package to find the
latest version, thus making many http calls, when it can just make one
call to get the latest version.

The cause of the problem:
- nuget.exe creates an AggregateRepository as the source repro;
- but AggregateRepository doesn't implement ILatestPackageLookup, so
  nuget falls back to the method of getting all packages to find the
  latest version.

The fix is to explicitly use ILatestPackageLookup on repositories inside
the AggregateRepository.
Add more unit tests for nuget.exe with http source.
Fix functional test UpdatePackageInAllProjects, because Ninject 3.2.0 was
recently released on 3/21/2014. So the ninject packages installed in the
test are now upgraded to version 3.2.0.
Adding more expected error codes to MockServer.
Fix the name of a functional test.