Add an init script to initialize some things at boot time.

We want to clear out resolv.conf at boot time in case we have
a left-over static config, so this commit creates a fpp_init
script that is run by the init setup on the new SD image.

Currently the only thing the script does is clear out the
/etc/resolv.conf file, but we may find other uses for it later.
The script runs after the filesystems are mounted, but prior
to networking being started.

Fixes #32.
Fix Issue #72 by sending 'd' to FPPD before killing
Fix issue #73 which found a few spots we forgot to have slashes between
directories and files in user-configurable settings.  These values
aren't assured to have slashes already, so we must add them.
Fix issue #74, the slash I missed.  I have now gone through each web
page using a configuration that doesn't have slashes in filenames to
ensure I have them all.  I hope there's no more that are missed.

I did notice a lot of code that will need to be reworked when we go for
a round of review/cleanup.

• Settings aren't universal.  Some things are read into individual
  variables, some are in an associative array.  Some are only read in
  the C application, not the PHP code.  Lastly, there should be some
  detection of setting the media directory so if you have a custom one,
  you don't have to also set all other configurable variables.

• There are a lot of TODO items in code.  Sadly a lot are mine.  I
  should go through and make a list of these in a "code review"
  ticket...
Settings bugfix and warning removal.

Set the default mode to player to allow fppd startup when there is
no settings config file.  I think this used to work and was
probably broken by the fpp mode enum changes.

Remove a warning in the settings file parsing that alerts if we
see a config option we don't know about.  This warns about
commented out entries and also makes warnings pop up when switching
back and forth between versions which might have different config
options, so just delete this fprintf call.
Merge branch 'stage' of github.com:FalconChristmas/fpp into stage
Fix settings parsing for USBDongleBaud that had old copy-paste parsing that was updated for most tokens
Fix some direct calls to sudo that should use the 'SUDO' define
Add a couple more things to the debug output and web settings parsing.
Plugin callback initial code:

• Coded non-blocking media and playlist callbacks, still need to code
  callback for nextplaylist that is blocking.

• Tested with callback function from the vastfmt plugin's script that
  supports the media callback.  Also implemented a playback stub to test
  multiple callback types and functionality.  That was later removed
  from the vastfmt plugin.

Future Work:

• Parse tags from media rather than simply passing the filename

• Cleanup string parsing when we move to C++

• Pass more details in the JSON data for playlist.  Currently we only
  pass each of the sequence entries, without numbering them.  We should
  look into passing not only indexed sequence entries, but other data
  like the "first" and "last" flags for the playlist.
Minor tweaks to the code:

• Only call MediaCallback for media types (not pause, nor events)
• Check for existance of media in JSON data passed to the media callback.
Fix a bunch of type warnings and duplicate variable names.

While testing compiling with g++, several issues were exposed
with missing type casts and duplicate variable names in several
files due to copying code around.  g++ isn't as forgiving of
these as gcc is, so this commit fixes all the issues to allow
g++ to be used to compile and make gcc usage safer.

We are evaluating switching to C++ to allow us to use classes
for handling strings and other data structures as well as
some 3rd party libraries for things such as meta-data handling.
This commit makes it easier to test or switch over after the
next release.

If you want to test compiling with g++, uncomment the g++ line
a the top of the Makefile.
Updated stage binaries
Add SD image creation script and docs to repository.
Add SD image .xz files to .gitignore
Fix some more directory paths to add missing /'s
Fix a couple bugs.

Fixes 'unknown' fppMode setting when changing to player mode via the UI.

Fixes common.php's WriteSettingToFile() and ReadSettingFromFile()
dealing with commented entries in the settings file.  Previously
commented entries would have been read and updated since the regex
match wasn't looking for the setting name at the beginning of a line.
This also fixes an unseen bug where we could have setting names
colliding if one full setting name matched the end of another setting
name.
Add build-essential to the list of things we put in the SD image.
File Manager UI enhancements.

- Add a 'Download' button to each tab
- Add a 'View' button to the Scripts tab
- Unify Download/Delete/View code into a single set of JavaScript
  and PHP functions rather than one function per action per file
  type.
- Replace real-ajax-uploader by jQuery-Upload-File.  There are some
  nicer jQuery upload plugins out there, but the changes for them
  would be more invasive and pull in a lot more files.  We can
  evaluate whether to switch to another solution at a later time.
  jQuery-Upload-File is covered by the MIT license.
- Include jQuery-Form-Plugin which is a dependency of
  jQuery-Upload-File.  jQuery-Form-Plugin is dual-licensed by the
  MIT and GPL licenses.  It is included here via the GPL license.
- Add some more helpers to config.php for getting a setting out
  of the settings array.

Fixes #78.
Rework MoveFile a little.

Rework MoveFile to use a regex to determine file type based on
the extension.  This makes it easier to group files of the same
type together such as .ogg/.mp3, .sh/.pl, etc..

Yes, I said .pl, more on that later....