Refactor platform for rhel support

Create an abstraction of linux platform. Make rhel and ubuntu subclass of linux. 

linux implementation is directly copied from ubuntu, because this is the minimal effect to ubuntu that I can think of, which could work as refactor, and at the same time, not that risky to the existing ubuntu implementation.