Don't build test_support_chromiumcontent on Windows (yet)

It's very Mac-specific at the moment. We'll need to modify it to work on
Windows.
Don't build chrome_browser_ui on Windows

This target contains only Mac-specific code. To make this clearer I've
moved the whole thing inside an OS=="mac" condition. I also moved
chromiumcontent's xcode_settings block inside the OS=="mac" condition to
keep Mac-specific settings grouped.
Add preprocessor defines for building on Windows

These defines are needed so that exported functions get marked with
__declspec(dllexport). There is some trickiness around WebKit symbols
that is explained in chromiumcontent.gypi.

This doesn't get us building quite yet, but brings us closer.
Add a mechanism for patching Chromium

Any *.patch files added to the (not-yet-extant) patches/ directory will
be applied before we build.

If patches fail to apply, we'll revert all changes and try again.
Reverting will delete our copied gyp files, so we have to make sure to
copy them *after* applying patches.
Fix linker errors about importing local ICU symbols

Our build of ICU combines all of ICU into one DLL (chromiumcontent.dll)
except for the stubdata library, which lives in a pre-built icudt.dll.
So we add a new preprocessor macro to let us build ICU in that
configuration.
Turn off the custom allocator

This was causing linker errors due to using two versions of the CRT
(Release for the allocator, Debug for everything else).
Don't build base/debug/debug_on_start_win.cc

This file only works when built as part of a static library. Since we're
building a shared library, we need to exclude it, just like Chromium's
"component build" does.
Silence warnings about needing to export scoped_ptr

Chromium's component build silences this same warning. I kinda suspect
it's a false positive since scoped_ptr is entirely defined in a header.
Use base's dllmain.cc

This is needed to link successfully (we need a DllMain function), and
matches what chrome.dll does.
Give chromiumcontent.dll a .def file

We use a wrapper around gyp-win-tool that does two things:

1. After a static library is linked, uses dumpbin.exe /directives to get
   the set of exported symbols from the static library, and saves it to
   a .lib.exports file.
2. Before linking chromiumcontent.dll, reads in all the .lib.export
   files for the .libs we're linking against and uses them to create a
   .def file that tells the linker to reexport all those symbols from
   chromiumcontent.dll.

The end result is that chromiumcontent.dll exports all public symbols
from all its static library dependencies.
Turn off incremental linking

This lets us see all the linker errors at once, and gets rid of a
warning about the module being too big to link incrementally.
Treat linker warnings as errors
Fix build error in ppapi_decryptor.cc

We were getting the following build error on Windows:

    FAILED: ninja -t msvc -o obj\webkit\media\crypto\webkit_media.ppapi_decryptor.obj -e environment.x86 -- cl.exe /nologo /showIncludes /FC @obj\webkit\media\crypto\webkit_media.ppapi_decryptor.obj.rsp /c ..\..\webkit\media\crypto\ppapi_decryptor.cc /Foobj\webkit\media\crypto\webkit_media.ppapi_decryptor.obj /Fdobj\webkit\support\webkit_media.pdb
    vendor\chromium\src\base\memory\ref_counted.h(250) : error C2027: use of undefined type 'webkit::ppapi::PPB_Buffer_Impl'

            vendor\chromium\src\webkit\plugins\ppapi\content_decryptor_delegate.h(30) : see declaration of 'webkit::ppapi::PPB_Buffer_Impl'

            vendor\chromium\src\base\memory\ref_counted.h(248) : while compiling class template member function 'scoped_refptr<T>::~scoped_refptr(void)'

            with

            [

                T=webkit::ppapi::PPB_Buffer_Impl

            ]

            vendor\chromium\src\webkit\plugins\ppapi\content_decryptor_delegate.h(163) : see reference to class template instantiation 'scoped_refptr<T>' being compiled

            with

            [

                T=webkit::ppapi::PPB_Buffer_Impl

            ]

    vendor\chromium\src\base\memory\ref_counted.h(250) : error C2227: left of '->Release' must point to class/struct/union/generic type

I believe something about our __declspec(dllexport) declarations is
causing this to happen. We work around this by defining an out-of-line
destructor for ContentDecryptorDelegate so ppapi_decryptor.cc doesn't
have to compile its destructor.
Fix build error in dom_storage_message_filter.cc

The error was:

    FAILED: ninja -t msvc -o obj\content\browser\dom_storage\content_browser.dom_storage_message_filter.obj -e environment.x86 -- cl.exe /nologo /showIncludes /FC @obj\content\browser\dom_storage\content_browser.dom_storage_message_filter.obj.rsp /c ..\..\content\browser\dom_storage\dom_storage_message_filter.cc /Foobj\content\browser\dom_storage\content_browser.dom_storage_message_filter.obj /Fdobj\content\content_browser.pdb
    vendor\chromium\src\base\memory\ref_counted.h(239) : error C2027: use of undefined type 'dom_storage::DomStorageNamespace'

            vendor\chromium\src\webkit\dom_storage\dom_storage_context.h(36) : see declaration of 'dom_storage::DomStorageNamespace'

            vendor\chromium\src\base\memory\ref_counted.h(237) : while compiling class template member function 'scoped_refptr<T>::scoped_refptr(const scoped_refptr<T> &)'

            with

            [

                T=dom_storage::DomStorageNamespace

            ]

            vendor\chromium\src\webkit\dom_storage\dom_storage_host.h(55) : see reference to class template instantiation 'scoped_refptr<T>' being compiled

            with

            [

                T=dom_storage::DomStorageNamespace

            ]

    vendor\chromium\src\base\memory\ref_counted.h(239) : error C2227: left of '->AddRef' must point to class/struct/union/generic type

It looks like the compiler was generating a copy constructor for
DomStorageHost, so now we disallow that.
Get rid of ICU's global new/delete

They cause linker errors due to conflicts with the operator new/delete
defined by the CRT.
Fix linker warning about _utf8_countTrailBytes_46

The warning:

    sqlite3.lib(sqlite.sqlite3.obj) : warning LNK4049: locally defined symbol _utf8_countTrailBytes_46 imported

This means that this symbol is decorated with __declspec(dllimport),
which is bad. Defining U_UTF8_IMPL fixes this problem, but causes
another error:

    third_party\icu\public\common\unicode\utf8.h(62) : error C2734: 'utf8_countTrailBytes_46' : const object must be initialized if not extern

For some reason ICU doesn't use U_CFUNC when exporting
utf8_countTrailBytes, but does use it when defining it or importing it.
Adding U_CFUNC fixes the above error, because it marks the symbol
`extern`.
Merge pull request #11 from brightray/windows-build

Get a basic Windows build working