Fixes WinPhone8 crypto provider bug when using SHA1 signatures.
Fixes some StyleCop issues and build warnings.