convert float and decimal to int for association preload

Several db's I write tools for have BigDecimal primary keys. Rails handles this very well except for when I try to do eager loading of associations. This patch fixes this problem for me and I don't think it will cause any problems, but please let me know if you think otherwise. I can demonstrate this with a simple app but couldn't see an easy way to write a failing for the project given my experience with it.  If there is anything else I can do though, please let me know.