test infra: clean up and minor features

Cleaned up the test infrastructure classes:

- derive base class from "object"
- use @property decorators
- for the "prompt" object accept a string or regex object