Scripting: Make _score in groovy scripts comparable

closes #8828
closes #9094