parser: Don't leak attributes between variable declarations

cVarDecl() uses a loop to parse multiple variable declarations
in a DIM statement (e.g. DIM AS INTEGER a, b, c). It only had one
"attrib" variable and modified it during the loop. This meant that
the changes to attrib would "leak" into the next loop iteration.

In practice it seems like the only modification made to cVarDecl()
is adding or removing FB_SYMBATTRIB_DYNAMIC, i.e. variables could
be turned into dynamic arrays (or vice-versa) accidentally.
parser: Improve REDIM detection, disallow duplicate REDIMs with namespace

http://www.freebasic.net/forum/viewtopic.php?p=200933#p200933

Commit 73951498 introduced a regression where (seemingly) duplicate
variable declarations via REDIM were allowed:
	namespace ns
		extern array() as integer
	end namespace
	redim ns.array() as integer
	redim ns.array() as integer
There are no array bounds specified for these REDIMs, so they act as
variable declarations, not as redims. The first REDIM defined the ns.array
EXTERN variable. The second should be an error, because ns.array already is
defined in the namespace. However, since commit 73951498 it did not trigger
an error anymore, but declared a local "array" variable instead. I.e. the
"ns." namespace prefix was being ignored.

To fix this, this patch improves the REDIM detection in cVarDecl(): The
is_redim variable is now updated with new information after parsing the
array bounds. This in turn allows hLookupVarAndCheckParent() to catch the
error in the above example, as it would for non-array EXTERNs.

Additionally I have adjusted hAddVar() to check the namespace prefix.
hLookupVarAndCheckParent() should already take care of all cases, but it
probably doesn't hurt to have the check there anyways - at least this way
it's clear that we're not just ignoring the namespace prefix there by
accident.