lock consistency with namecoin

namecoin in checkinputs didnt lock cs_main unless its not a new alias
and only around where mapAliasesPending was being changed.