Operators: Casting of objects to programs supported for all objects.
The cast operator now falls back to object_program() when casting objects
to programs when there is no lfun::cast(), or it returned UNDEFINED.
The old behaviour for the above cases was to throw either of the errors:
"No cast method in object.\n"
"Cast failed, wanted program, got int\n"
Needed to implement [bug 6573 (#6573)].