Adding SPIR64 target

This pull request adds the SPIR64 target, and slightly refactors the previous SPIR target and related code to make it a bit simpler.