Fix warnings.
Add shellapi.h back to Windows includes, remove redundant includes.
MinGW build tweaks for the client.