Add code to give better error message when using an undefined RDom dimen...

...sion.

(Fixes https://github.com/halide/Halide/issues/332 )

Add test for above.

Remove use of double underscores in identifer as these are reserved in C++.
wneh -> when