ENYO-371: Attempts to set scroll position fail in certain cases

enyo.Scroller attempts to honor requests to set scroll position
(via setScrollTop() and setScrollLeft()) even when the scroller is
hidden. However, it fails to do so in some cases (e.g. when the
Scroller itself is showing, but one of its ancestors is hidden,
or when a DOM ancestor of Scroller does certain types of async
things in response to onShowingChanged, like a subkind of
enyo.Popup that animates on show / hide).

The latter case can be avoided with thoughtful design of the
subkind (e.g. moon.Popup, which also animates when showing / hiding
but doesn't have this issue), but it would be nice to be more
bullet-proof.

To achieve better results, we replace Scroller's position caching /
restoring mechanism with a simpler mechanism based on the
onShowingChanged event of enyo.Control (which lets Controls
respond when an ancestor is shown or hidden, but which didn't exist
when Scroller was originally implemented).

To make this work, I adjusted the timing of onShowingChanged.
Previously, a Control would consistently waterfall this event after
hiding / showing itself. However, descendants will be able to do
more useful things with the event if we waterfall *before* hiding
(when a descendant can still take measurements or perform DOM
operations requiring a visible node), but  *after* showing (again,
so that a descendant has a visible DOM node to work with as
needed).

This commit also includes a new utility function (isNumeric()) in
lang.js. This was required by a fix that I ended up rejecting, but
it seems like it might be useful in other cases so I am leaving it
here.

Enyo-DCO-1.1-Signed-Off-By: Gray Norton (gray.norton@lge.com)
ENYO-392: Allow definition of custom hold events

Garnet has requirements from MC to support "longpress" behavior,
in addition to basic "hold" behavior.

Rather than add new events globally, we will extend the existing
"configureHoldPulse" functionality so that Garnet (and others in
similar situations) can easily define a set of custom hold events
to meet their specific requirements.

We add an "events" property to the holdPulse configuration object.
This property takes an array of objects, where each object defines
a custom hold event in the form of a name / time pair. We also add
a "frequency" property that determines both the frequency of
holdpulse events as well as the frequency with which we check to
see whether it's time to fire a hold event. These new properties
together replace the old "delay" property. For backward
compatibility, we look for config objects containing "delay" and
automatically translate them to the new format.

We also expose a public enyo.gesture.drag.configureHoldPulse()
method that will allow a library or app developer to imperatively
change the default holdPulse configuration. This will allow
Garnet, for example, to universally use a custom set of hold
events, avoiding the need to override the defaults in the "down"
handler for every Control.

Also added docs for configuring holdPulse. These docs are fairly
comprehensive, but will need some editing love and some reorg to
take advantage of JSDoc structured metadata (e.g., properties
and their default values are currently described, but only in free
text).

Enyo-DCO-1.1-Signed-Off-By: Gray Norton (gray.norton@lge.com)
BHV-17152: Changing functionality in Input.js file for making the behavioral same between Input and InputHeader when RTL is true.
add support for custom hold pulse events in gesture sample

Issue: ENYO-392
Enyo-DCO-1.1-Signed-off-by: Ryan Duffy (ryan.duffy@lge.com)
correct hold pulse duration in sample

Enyo-DCO-1.1-Signed-off-by: Ryan Duffy (ryan.duffy@lge.com)
Merge pull request #905 from enyojs/ENYO-392-graynorton

ENYO-392: Allow definition of custom hold events

Reviewed-by: Ryan Duffy (ryan.duffy@lge.com)
Integrated-By: Aaron Tam (aaron.tam@lge.com)
Inserting $dev-guide token in paths to conceptual docs.
Enyo-DCO-1.1-Signed-Off-By: Jim Tang (jim.tang@lge.com)
Merge branch 'master' of https://github.com/enyojs/enyo
Removed redundant value check. Added matching functionality to enyo.RichText.
* `this.value === '0'` is redundant since a zero in a string is already truthy.
* Removed unnecessary whitespaces (automated)

Enyo-DCO-1.1-Signed-off-by: Blake Stephens <blake.stephens@lge.com>
Inserting $dev-guide token in paths to conceptual docs.
Enyo-DCO-1.1-Signed-Off-By: Jim Tang (jim.tang@lge.com)
Merge pull request #920 from enyojs/BHV-17152-anshu099

BHV-17152: Changing functionality in Input.js file for making the behavi...

Reviewed-By: Blake Stephens (blake.stephens@lge.com)
Integrated-By: Aaron Tam (aaron.tam@lge.com)
ENYO-371: Consolidate conditionals.

Enyo-DCO-1.1-Signed-off-by: Aaron Tam <aaron.tam@lge.com>
Merge pull request #899 from enyojs/ENYO-371-graynorton

ENYO-371: Attempts to set scroll position fail in certain cases

Reviewed-by: Ryan Duffy (ryan.duffy@lge.com)
Integrated-By: Aaron Tam (aaron.tam@lge.com)