cleanup context properties a bit
refactors context properties parsing and setting

- correctly calculate the length of the storage array.
- ensure that in a given key,value pair value is sensible. Necessary because properties has an odd length.
- rework control flow.
- context properties should not start with a zero.
adds test for context properties
Merge pull request #33 from JuliaGPU/vc/fixglctx

Context Properties parsing and setting