[FIX] models, test_new_api: adapts tests of onchange(), and fix onchange() to return dirty values only