This patch fixes two instances of not deducing address spaces for global template variables.
I've added OpenCL address space deduction to the functions responsible for specializing template variable declarations,
and while this does give the correct address spaces, it is not optimal, as this same address space is deduced at least three times for a single variable.
It would be better if the correct type was correctly passed forward through the phases, which I've explained in the comments.
Since the variable is templated I'm not entirely certain if this is feasible or worthwhile compared to the simple solution of rededucing the address space several times.
I've also included this an example of this in the test for address space deductions