Friendlist: serverside client code (so that friends can be added etc.)

Contains only the PHP code for the client, so that I can continue working on JavaScript code.