Window stats "moving average"
it's not quite a simple moving average
calculates a series of percentile ranks
currently: 5/10/25/40/50/60/75/90/95th
the "50th" percentile is the median.
Add "window stats" to ZERO method
there is currently no logic to use it,
just the code to do the calculations.

This commit will support future logic.
correct syntax (node.js arrays & Math object floor method)
The code barely looks different, but works now...

The following "oops" fixed:
array indexes use [] not () in node.js
floor() method belongs to the Math object
Merge github.com:kuzetsa/gekko into portfolio.debug
portfolio debug code closely tracks master "HEAD"