Added a function to dynamics

Added a function which calculates the Mardling stability criterion for
hierarchical triples.

Additionally, the dynamics module was not properly added in the last commit.
It has been added in this commit.