Directory restructuring to better support platform-specific files

Also, arch.h has been renamed to platform.h for clarity and consistency.