[#2450] Add support for OS X.

Problem
=======

We want to support OSX

For now, only OSX 10.8 is supported

Changes
========

We used to support OSX 10.4 on PowerPC so there were not many changes.

OSX store Unicode in a strange format.

I have also discovered that our _get_supplementary_groups was returning duplicate names... which was not a problem for other operating systems but OSX has a limit of 16 groups.

... and that pwd.getpwnam() return a structure for empty string... just like Winodws... even when guest account is disabled on OSX.


How to test
=========

reviewers: @alibotean 

check that changes are ok.

I will create another review with changes integrated into server and will ask Laura to test the changes

a test build for OSX was run at http://build.chevah.com/builders/compat-osx-108/builds/13

Thanks!
once this hits master I will enable OSX test for all merges.