Fix build with XCode and handle special OPTIONS better.

We now handle CMAKE_CFG_INTDIR in the tests and also parse OPTIONS
in pairs as opposed to using cmake_parse_arguments. This means that
we don't get strange behaviour if we had a non-special MULTIVAR arg
in between a special one