MSVC: fix SSE/intrinsic support

MSVC with enabled RAPIDJSON_SSE2/RAPIDJSON_SSE42 requires the explicit
definition of the `_BitScanForward` intrinsic.  This can be reliably
ensured by including "intrin.h" and properly marking '_BitScanForward'
as intrinsic.

Confirmed on MSVC 2005, 2008.
Should fix https://code.google.com/p/rapidjson/issues/detail?id=96
encodings.h: hide narrowing conversion warnings on MSVC
Writer::WriteUint: add cast to hide warning C4244 on MSVC
rapidjsontest.cpp: silence a warning (C4244) on MSVC
MSVC: fix compiler error in GenericDocument

The `StringRefType` assignment operator overload
leads to a compiler error on MSVC 2005 and later:

..\..\include\rapidjson/document.h(504) : error C2951: template declarations are only permitted at global, namespace, or class scope

Drop the unneeded 'template' keyword here.
StrLen: align implementations

There are two copies of `StrLen` in the RapidJSON code base
 * strfunc.h: rapidjson::internal::StrLen<Ch>
 * unittest.h: Strlen<Ch>

To hide a warning on MSVC, align both implementations to use
'unsigned/SizeType' as return type and add an explicit cast.
writer.h: use warning macros for MSVC
premake4.lua: only enable "-Wswitch-default" in unittest

There's no need to enforce this flag during the build of the perftest
or the GoogleTest library, as both include third-party code.
Merge pull request #62 from pah/fixes/msvc

Fixes and cleanups for MSVC