Gravity implementation and tests

Updated index.js so that it contains an implementation of gravity falling time function and associated tests.