fixed calcDifficulty by making sure the MAX_TARGET is also locally available.
added tests for 2 difficulty calculations.
updated the calcDifficulty test to make it clear with what we're testing
Merge pull request #226 from blocktrail/calcDifficulty-fix

fixed util.calcDifficulty