Started working on SNTP-based timestamps
Event timestamps are now written in epoch format after NTP synchronization

NTP sync is performed using a modded version of
android.net.SntpClient.java (it was necessary to compute the NTP reference
from System.nanoTime() since this is what SensorManager uses).  If NTP time is
not available, system clock is used.
2-character unique device ID is now part of a file name

To generate the ID, Settings.Secure.ANDROID_ID
Refactored inner classes into separate files; implemented SharedPreferences activity

DataLogger, FileManager, and DLSoundRecorder classes were broken out into
separate files (maintaining references to the invoking DanceLab
instance). Within the main class they are left as de facto public members, so
that other classes have access to their methods.

Preferences are now set through the SharedPreferences API using the prefs.xml
resource.
Put in the framework for peak detector

PeakDetector class is a member of DataLogger.  It operates by spawning a
HandlerThread; if sync is active, DataLogger sends the {timesteamp,
accel_mag} tuple through a lightweight class inside a message.  PeakDetector
implements Callback to process this message and do the necessary computations.
Stop and sync button now accept long presses; sync button multifunction

Sync button now supports the following behavior: long press if sync success
is reported -> restart peak detector; long press while peak detector is
running stops it.  Note that before every button color change (including to
null) you have to toggle the setEnabled state, o/w color change doesn't work
on CM9 / Gingerbread on HTC Hero (possibly others); example:
        syncButton.setEnabled(false); syncButton.setEnabled(true);
        syncButton.getBackground().setColorFilter(0xFF00FF00, PorterDuff.Mode.MULTIPLY);
Peak detector sync finished and debugged; preferences added

Peak detector now has two parameters: absolute threshold and standard
deviation threshold.  Both have to be cleared for the maximum to register.
After the thresholds are cleared, the system returns the timestamp of maximum
acceleration seen after the threshold.  Experiments show that bumping the
phones together provides a very poor reference; shaking or rotation should be
used instead.  Default values for the thresholds are still optimized for the
bumping approach.
First prototype of working accel. trace in GraphView.java
GraphView shows the running acceleration trace; NTP sync saves data.

Acceleration magnitude trace is shown in GraphView; drawing of the trace is
done by a HandlerThread that receives messages from DataLogger (currently
they are passed by the acceleration even listener).

NTP sync class now saves the timestamp and reference offset in
SharedPreferences (filename "datastorePrefs"). If NTP lookup fails and
there's no instance of ntpClient with good data in the current application,
the saved values are used (provided the phone hasn't been rebooted after
they've been saved).

File list display view is now invoked through a menu item and splash screen
is shown at application start and resume.

Strange behavior in the handleMessage method of GraphView: when resuming the
application with accelerometers running, it seems to receive a message with a
null object field, necessitating explicit checking for null.

Strange behavior of the GraphView thread: upon stopping, we get exceptions
due to messages are being sent to a dead thread. The call to to stop logging
and unregister sensor listeners comes before that to quit the handler thread;
it's not clear to me yet why the execution order gets messed up.
Merge branches 'expt-trace' and 'master'