Context Properties parsing and setting

This PR fixes the parsing and setting of OpenCL context properties.
now that you have fixed this, these assertions should never fire.  Instead of error messages for the assertions, could you write a toplevel comment describing what is going on?   That way the assertions are self evident if we ever have to go back to this again.