Fixes to stability polynomial calculations.

Moved stability interval functions to stability_function.py.