Added configure script.

Basic dependency detection and assistance to user in installing missing dependencies. Automatic switch for USE_UPNP in makefile.