Refactor platform_detect to Platform, add Pi revision detect function, and default I2C bus function.