Add two functions to stack time segments and calculate std devs.

Cherry-picked from commit c55780de6e56c3cef799e02bc03d4ccfe04b7cb5 on graphite master.
Merge pull request #1 from cloudant/ddt-stddev

Add two functions to stack time segments and calculate std devs.