Extracted common parts into a .rake file which we can include from other places also.
Fixed the byte_order header so that it now compiles (and dropped 386 support, since it's not really needed any more). The string library therefore compiles successfully - wheegit add ../system/byte_order.h