Fix objectify()'s handling of "foreign objects".
- Fix handling of "foreign objects" so they are converted to the
appropriate class (Math::BigInt or Math::BigFloat).
- Avoid code duplication by using only one loop.
- Loop over indexes rather than array elements to make code cleaner.
- Fix incorrect code comments, add more code comments and clearify
existing ones.
- Correct handling of undefs to make the code consistent. objectify()
gave different output when the initial "shortcut" was removed.
- Add test file verifying that RT#16221 is fixed.
This fix closes RT #16221 and RT #52124. This patch supersedes Perl #86146.