Fix decimal_test module and add new test for object responding to to_d