fix seeking in ffmpeg

When playing with ffmpeg plugin and user seeks to the beginning of track, cmus
wouldn't immediately start from the beginning, but would continue playing for
a while (about 3~5 seconds), and then suddenly jump to the beginning.

A segment of code is added in ffmpeg_seek() to flush the decoded output and
reset the input buffer. This should make it jump immediately, but the current
duration after jump is still not precise.
Support XDG directories with backwards compatibility. Fixes #33.

To determine where the configuration files are located, the logic
is as follows:

- CMUS_HOME takes priority, as before.
- ~/.cmus is used if it already exists, to maintain backward
  compatibility.
- New users default to XDG_CONFIG_HOME/cmus, or ~/.config/cmus if
  XDG_CONFIG_HOME is unset.

To determine where the socket is located is a bit more simple:

- XDG_RUNTIME_DIR/cmus-socket if XDG_RUNTIME_DIR is set.
- Otherwise, name it 'socket' in the config directory, as before.
Updated documentation to use XDG paths.
fix typo in tutorial doc
Merge pull request #77 from acoffman/master

Change "hear" to "here" in tutorial doc
Show all tracks when artist is selected

- If the artist is selected, all tracks are shown with headers indicating
the albums.
- There is an option called auto_expand_albums. If it's set to false, the
player doesn't automatically select the album when commands such as
win-sel-current are executed and instead selects the artist. If the
albums of this artist are already expanded, the album is selected.
Bugfixes regarding selectable rows

- win_goto_top and friends now respect the selectable property of rows.
- Moved code to select a selectable row after window_set_contents to
  window_set_contents.
- Also some comment style fixes.
Merge pull request #79 from mahkoh/show-all-tracks

Bugfixes regarding selectable rows
ignore releaseDate=0 in mp4 files
Merge pull request #81 from mahkoh/m4a

ignore releaseDate=0 in mp4 files
use mp4 genreType if necessary
Merge pull request #82 from mahkoh/mp4tags

use mp4 genreType if necessary
Fix seg fault in run_cmd

parse_one was setting ret to part and then immediately freeing it before
returning.

Set it to xstrdup(part) instead.
Merge pull request #84 from electric-blue/master

Fix seg fault in run_cmd
Fix use of uninitialized value in wav.c

Old version uses uninitialized `*size` if the file is corrupt.
This also fixes the bug that corrupt wav files can crash cmus.
Merge pull request #86 from mahkoh/wav

Fix use of uninitialized value in wav.c
Improved shuffle mode

When a track is manually chosen in shuffle mode, it is inserted at current
position in the shuffle list.
Rename several functions

  tree_set_selected ->   tree_activate_selected
sorted_set_selected -> sorted_activate_selected
    pl_set_selected ->     pl_activate_selected

      tree_set_next ->   tree_goto_next
    sorted_set_next -> sorted_goto_next
        pl_set_next ->     pl_goto_next

      tree_set_prev ->   tree_goto_prev
    sorted_set_prev -> sorted_goto_prev
        pl_set_prev ->     pl_goto_prev
Merge pull request #87 from mahkoh/shuffle

Shuffle + Rename

Should make #39 a bit better.
Fix use-after-free in browser

browser_load frees browser_dir but ptr, which points to a substring of
browser_dir, is used afterwards.