fix a problem of poking negative numbers
Ensure consistency between markedNodes and the IslandCollection result.

When building reference-chip with --partitionIslands, we were getting
a Java NoSuchElementException when we tried to move nodes between
islands, because some of the markedNodes were not in the
IslandCollection result.
Reorganize the code so those collections are more likely to be kept in
sync.
Verify that entries exist for the source and destination islands
before attempting to modify them - generate a ChiselError instead of
an exception.
Use needShadow() in emitRefHi() if allocateOnlyNeededShadowRegisters.

Issue #315 indicates we were dropping the fact that a shadow register
had been used (ad was required) in the clock_hi() code. Change the
logic so we use needShadow() if appropriate.
Move determineRequiredShadowRegisters() so it doesn't break up the
emit methods.
Merge pull request #317 from ucb-bar/partition315

Two fixes for issue #315 --allocateOnlyNeededShadowRegisters breaks code, eats a register
Merge branch 'master' into litport168
Merge pull request #318 from dadeba/fixpokenegative

fix a problem of poking negative numbers
Pass "-C <targetDir>" to make - issue #319.
Merge pull request #320 from ucb-bar/makedir319

Pass "-C <targetDir>" to make - issue #319.
Revert "fix a problem of poking negative numbers"
Revert pr #318 - fix a problem of poking negative numbers.

This assumes it is more desirable to be able to poke large unsigned
numbers, than poke 32-bit signed numbers in hex format.
Merge pull request #323 from ucb-bar/pr/322

Revert "fix a problem of poking negative numbers" - #318
Merge branch 'master' into litport168
fix bfs & dfs
fix a binding problem
Merge pull request #326 from ucb-bar/fixbinding

fix a binding problem
Merge branch 'master' into litport168
Update error message.