Replace os.sep.join with the more robust os.path.join

From the Python docs for os.sep [1]:

  Note that knowing this is not sufficient to be able to parse or
  concatenate pathnames - use os.path.split() and os.path.join()...

Where I touched a line, I also changed double quoted string literals
to single quotes, since they are used more often in the source:

  wking@mjolnir ~/src/pelican $ git grep "'" pelican/*.py | wc -l
  683
  wking@mjolnir ~/src/pelican $ git grep '"' pelican/*.py | wc -l
  181

[1]: http://docs.python.org/3/library/os.html#os.sep
settings: Use splitext to remove extensions, not rpartition
Convert '.' and '..' to the less magical os.curdir and os.pardir

While I'm cleaning up path manipulation, I might as well make things
more semantic.
utils: Add path_to_url() and generalize get_relative_path()

The old get_relative_path() implementation assumed os.sep == '/',
which doesn't hold on MS Windows.  The new implementation uses
split_all() for a more general component count.

I added path_to_url(), because the:

  '/'.join(split_all(path))

idiom was showing up in a number of cases, and it's easier to
understand what's going on when that reads:

  path_to_url(path)

This will fix a number of places where I think paths and URLs were
conflated, and should improve MS Windows support.
Merge pull request #768 from wking/path-handling-cleanup

Cleanup path handling (os.path.join and more)