add xdg-shell-protocol.c

This fixes previous commit. I forgot to add this file to git.
fix various compiler warnings

mostly comparsion of signed/unsigned integers and const quelifiers