Add a public API for setting animation's duration

This commit fixes issue #2. Before it animation's duration was hardcoded to 0.25 seconds. Now it's set by default to 0.25 (so it's backward compatible), but it's also possible to change it in runtime.