Remote fetch via IRC first implementation

Closes issue #12 and progresses issue #16

New Files:
> modules/autohandler.py
> modules/sites/test.py
> static/images/RSS.png
> static/images/irc.png
> static/images/submit.png

Modified Files:
> .gitignore
> modules/irc.py
> modules/login.py
> modules/remotes.py
> modules/rpchandler.py
> modules/server.py
> modules/sites/ptp.py
> modules/weblog.py
> htdocs/autoHTML.tmpl
> static/javascript/auto.js
> static/scss/auto.scss (==> /css/auto.css)
> static/scss/main.scss (==> /css/main.css)

modules/autohandler.py
> Provides responses for web socket requests via /auto
>
> AutoHandler main class is initialised on every websocket request in
> modules/server.py
>
> Provides (currently) three methods: get_sources, set_source, and
> start_bot
> These are accessed via the handle_messages method
>
> get_sources:
>  calls modules/remotes.py searchSites method (see below)
>  formats and returns HTML to be inserted into /auto
>  called on every page load of /auto
>
> set_source:
>  calls modules/remotes.py RemoteStorage addRemote method (see commit
>  f17d4d and below)
>  in summary: adds appropriate settings required for remote fetches to
>  persistent storage
>
> handle_messages:
>  parses, verifies, and executes autoSocket commands

modules/sites/test.py
> Example 'source' handler

.gitignore
> Ensured that the .remotes.pickle file isn't committed

modules/irc.py
> Changed the _Config class to be a remotes.Settings object (subclass of
>  dict)
> Added a very basic fetch mechanism:
>  if an integer is announced in the channel, it will send this as a
>  torrentid to the ptp fetch mechanism

modules/login.py
> Added the new function getPermSalt:
>  returns the salt from the user password hash

modules/remotes.py
> Added two new functions: searchSites, and getSiteMod
> These are both static methods
>
> searchSites:
>  searches the modules/sites/ directory for any python files
>  attempts to load them, and obtains the attributes DESCRIPTION and
>   REQUIRED_KEYS
>  it then returns these as a list
>  this function is currently accessed by the modules/autohandler.py
>   AutoHandler get_source method
>
> getSiteMod:
>  this returns the named 'source' module, loaded and ready to go
>  (note: the module Main class still has to be instanced)
>
> Base class modifications:
>  Modified the Base class to also require shared object storage upon
>  initalisation, this allows direct access to required authentication
>  strings during remote operations
>
>  Added the private _fetch_keywords function for obtaining settings
>  stored in RemoteStorage, this function is run after initalise
>
>  Added the post_init function designed for overriding which is executed
>  after _fetch_keywords, this is intended to be used for 'source's that
>  require fetching of cookies for downloading, the settings that are
>  stored are loaded into the _required_keys attribute of settings
>
> Modified methods for RemoteStorage class
>  Removed the requirement for specifying a base_url in addRemote, this
>  should be defined within the 'source' handler module directly
>
>  Removed the concept of 'remoteid's, now refer to everything by 'name'
>  (also indirectly removes the possibility that two settings could be
>  stored for the same handler)

modules/rpchandler.py
> Added the reqirement for passing the shared log, ajax, and storage
> instances, this is so that they can be passed onto 'source' handler
> objects when they are initialised
>
> Added the 'fetchTorrent' method:
>  this loads the site module referred to by name using the
>  modules/remotes.py getSiteMod method
>  it then runs fetch, and process
>  thus this method allows an IRC bot to trigger the application to
>  download a torrent remotely from an arbritray source

modules/server.py
> Removed the testing IRC bot spawning for autoSocket to use the
> autohandler handle_message method

modules/sites/ptp.py
> Renamed the class to Main to allow a consistent interface
> All subclasses of remotes.Base should be named 'Main'
> Removed the necessity of specifying authkey and torrent_pass during
> initalisation, they are now directly fetched from RemoteStorage

modules/weblog.py
> HTML escape all log message (encodes &, < and > as HTML entities)

htdocs/autoHTML.tmpl
> Added jquery UI to scripts (for modal dialogs)
> Added crypting scripts for hashing
> Removed the RSS, and Web tabs (will be implemented later)
> Made the Auto tab refresh the page
> Changed IRC id to #tab_irc (Note this tab now spawns an IRC bot, see
>  auto.js)
> Removed IRC, RSS and web wrappers
> Added HTML for an interface to available 'source' handlers as defined
>  in modules/sites/ (see modules/remotes.py above)
> Added a modal dialog for submitting a password field

static/javascript/auto.js
> Allows the setting of anything that might be required by 'source'
> handler modules by using the modules/remote.py searchSites method (via
> autosocket and autohandler)
>
> Placed in structural code ready for reversible encryption of these
> settings, but haven't implemented it
>
> Added various UI elements to the main /auto page, allowing clicking of
> table rows to reveal settings "drop-down" menus
>
> Added very basic validation of setting inputs (currently only checks
> if they are non-empty)
>
> Added simple initial request for 'source' handler module information
> (get_sources method)
>
> Added basic error handling for ERROR responses (ignore them)
> Modified the navigate_tab function to simply refresh the page

static/scss/auto.scss (==> static/css/auto.css)
> Added a whole bunch of styling

static/scss/main.scss (==> static/css/main.css)
> Changed selectors that interfere with the /auto page styling