Change the definition of stuck projects

Projects are stuck, if there is no NEXT task but there is at least one
TODO.
Fix indents
Add inactive-project check

A project is inactive if it has one of the inactive todo states or if
the project does not have TODO or NEXT tasks defined.