DynamoDS/Dynamo — pull request #1743 by ke-yu (2014-06-09 09:22:16+00:00)
Title: Code clean up for StackValue

This is code clean up work for StackValue and its related functions:

1. Move most extension functions defined in ```StackUtils``` class to ```StackValue```. They are:
* Type checking functions like ```StackUtils.IsString()```, ```StackUtils.IsNull()``` and so on.
* Type type conversion functions like ```StackUtils.AsInt()```, ```StackUtils.AsDouble()``` and ```StackUtils.AsBoolean()```, they are moved to ```StackValue.ToInteger()```, ```StackValue.ToDouble()```,```StackValue.ToBoolean()```.
* ```StackUtils.Equals()```
2. Replace hard coded type checking for ```StackValue``` with type checking properties. For example, replace ```AddressType.BlockIndex == opdata.optype``` with ```opdata.IsBlockIndex```. It makes the code more succinct and easier to understand. It also makes the further optimization be easier.
3. Remove verbose namespaces in some long expression. For example, replace ```ProtoCore.DSASM.Constants.kInvalidIndex``` with ```Constants.kInvalidIndex```.

The pull request has been sent before. Code review and discussions could be found in: https://github.com/DynamoDS/Dynamo/pull/1680. That pull request includes code cleanup *and* the unification of opdata and opdata_d and ArrayKey hack. This pull request keeps the code cleanup work but *reverted the unification work, ArrayKey hack and restore ```StackValue.ShadowClone()```*.

Run all DS language test cases and verified no regressions.