ShareDialog: Manage null error message
LTM Chart Settings improved UX

The definition of curves is rationalised to match the
new design mockups in readiness for introducing user
defined peak durations for power et al.

For now this patch cleans the UX and makes it much
easier to add/edit/remove curves.

Fixes #548
LTM bars cosmetics

Just made gap slightly smaller to make it easier to
compare and overall the proportions 'feel better'.
Add Current to LTM presets

But saving is an issue !

The presets need to move to the athlete object as they
are in the athlete directory -- we currently have one
per LTM chart, which means they get overwritten on exit.
Truncate Altitude values

We know the highesst point on Earth, so any activity that
contains an altitude greater than that is definitely incorrect.

This patch truncates the altitude to the maximum possible, this
has the happy by product of curing a major mem alloc crash in QWT
when trying to plot altitudes with very large values.

Fixes #700
Show/hide scopebar with toolbar

When showing / hiding the toolbar we also show / hide
the scope bar. This is so when in train mode and you go
full screen it is possible to hide all ornamentation.

This will become a moot point when the scope bar is
replaced with 'appstore style icons' in the toolbar
to switch between home, analysis, train etc.
Plot Peak Power et al 1 of 2

Update to let users specify a custom duration
to plot on LTM for peak power, vam, wpk etc.

This update is to the LTM chart settings and
the reading/writing of chart settings.

Next update will update LTMWindow/LTMPlot to
retrieve and plot the values from the CPX files.

Note: the values will not plot yet, the next
      commit in this series is required.
Urgent Fixup to previous commit

.. to make sure the v2 LTMSettings
   uses the bestSymbol.

Just pushing this (WIP) to make sure
we don't get half baked LTM settings
from people building against the previous
commit.
Plot Peak Power et al 2 of 2

Updated RideFileCache and LTMWindow/Plot to
plot the user defined durations for peak power.

Actually we support all the different meanmax
measures available in the CP chart, so you can
now track peaks for user defined durations of;

            * Power
            * Watts per Kg
            * xPower
            * NP
            * Heartrate
            * Speed
            * Cadence
            * Torque
            * VAM

I have not spent much time optimising for performance
but reusing the same 'seek' approach used by the recent
update for best() and tiz() functions in the datafilter.

Fixes #322.
Fix User Defined LTM durations bugs

.. refresh didn't clear old curves
.. didn't honour any filter being applied
ShareDialog: Add ipload to www.cyclinganalytics.com
Hide buttons when no Tokens configured

.. for Strava or CylingAnalytics upload
   authorised buttons in the preferences
   dialog.
Fix GC_CYCLINGANALYTICS_CLIENT_SECRET #ifndef
New Metric Percent Time In Zone

The current TIZ metrics only allow you to chart the
absolute time in zone. Over longer periods it can be
helpful to look at the overall ratio of intensities
trained at.
Merge branch 'master' of github.com:/GoldenCheetah/GoldenCheetah
HR Time in Zone percent

.. to match the recent update for the power
   time in zone metric.
Interval Summary Off By 1 Error

Intervals are off by 1 sample because when the temporary
ride is created it stops short of the last sample in both
the ride and interval summary window code.

Fixes #623.
Add /dev/cu.usbserial as a serial device

Useful on Mac with Sewell adapter for the CT.
ShareDialog: Add upload to selfloops.com
W' expenditure and reconstitution calculator

Calculates the W' expenditure and reconstition during a ride.
The implementation is sub-optimal and will need to be optimised
and probably re-written to improve performance before v3.1 is
released.

This is based upon research conducted at the University of Exeter
by Philip Skiba, Weerapong Chidnok, Anni Vanhatalo, and Andrew Jones
and is used with permission.

For more information on the research please see: ""Modeling the
Expenditure and Reconstitution of Work Capacity above Critical
Power." Med Sci Sports Exerc 2012;:1.