Add SRWLock implementation of rwlocks for Win32
Drop support for THREADSAFE on Windows XP

This makes libgit2 require Windows Vista or newer if it is going
to be compiled with the THREADSAFE option
Trying to fix Win32 warnings
Fix sortedcache docs and other feedback

This converts an internal lock from a write lock to a read lock
where write isn't needed, and also clarifies some doc things about
where various locks are acquired and how various APIs are intended
to be used.