Imp. add threshold while shaking

An interval of retrieving acceleration became 10 time faster
while shaking.
Because it is necessary to get more detailed data when shaking.
The window time is 1000 msec. After 1000 msec,
it resets the interval.
Merge pull request #12 from ikeyasu/retrieve-condition-from-cloud2

Imp. add threshold while shaking