[GH #909] Add SO_ and SOL_ definitions, add setsocktopt test

Do not use the g/set_flags vtable interface for g/setsocktopt methods.
Be explicit as it is for sockets only.