Fixes rounding of dirty rects and MBRs

We want the areas of the screen that we clear and clip to have integer coordinates.  Prior to this patch there were some cases that were not caught.  The solution is to do this "rounding up" of regions directly before we use them, rather than as they are created.

Similarly, the MBRs used should have integer coordinates.  This fixes a regression that caused them to be "rounded down" in some cases, and also special cases rotations of 90 degrees.   Previously, taking (say) the cosine of PI/2 resulted in a very small nonzero value, which due to rounding caused some deviations from an ideal 90 degree rotation.

This seems worth special-casing due to the privileged nature of 90 degree rotations.
Merge pull request #550 from starwed/rounding-fix

Fixes rounding of dirty rects and MBRs
corrected formula for calculating x and y in sprite function
Merge pull request #551 from moehabib/spritePadding

corrected formula for calculating x and y in sprite function
Fixed indentation in README
Merge pull request #554 from L8D/patch-1

Fixed indentation in README

Unindents the sample code.
Remove grunt-cli dependency

grunt-cli should be installed globally using `npm install -g grunt-cli`.

From grunt-cli README:

> If you don't have administrator rights, you may need to install
> grunt-cli locally to your project using
> `npm install grunt-cli --save-dev`. Unfortunately, this will not put the
> grunt executable in your PATH. You'll need to specify its explicit
> location when executing it, eg: `./node_modules/.bin/grunt`.
>
> Note: Using grunt-cli in this way is unsupported.

Source: https://github.com/gruntjs/grunt-cli#installing-grunt-cli-locally

See also https://github.com/craftyjs/Crafty/commit/44eb78836dc074f3e33f669fe7a7ce150e10daaa#commitcomment-4263105
Merge pull request #555 from potomak/feature/remove-grunt-cli-dependency

Remove grunt-cli dependency
IE8 viewport code: Use a global event instead of a listener entity

The advantage of this approach is: IE8 code has the same number of
entities as other browsers, so Crafty('*') behaves predictably etc.
Also, this change removes a layer of unnecessary abstraction /
complexity.
Merge pull request #558 from sbyrnes321/viewport

IE8 viewport code: Use a global event instead of a listener entity
fix unit-tests to avoid false-positives in IE8
Merge pull request #559 from sbyrnes321/IE8tests_take2

fix unit-tests to avoid false-positives in IE8
Fix jshint warnings

Note: I left an error on core.js because it's there to handle
components modules definition, but it should be fixed using AMD, or
CommonJS, or an alternative method.

```
[L1604:C10] E006: Unexpected early end of program.
})(window,
>> Expected an identifier and instead saw '(end)'.
>> Expected ')' and instead saw ''.
>> Missing semicolon.
```

I left some *warned* code:

 * some code on loader.js (I suggest using a different loading strategy)
 * intro.js, outro.js
 * evals on storage.js

See #557

Note about `===` vs `==`
Changing `value == null` to `value === null` as suggested by jshint is
semantically different as `value == null` is true also if `value` is undefined.
Some `== null` were checking also for undefined variables, that's why some
`value == null` have been changed to `typeof value === 'undefined'`.
Fix image loader on IE; add loader test

`obj.src = ""` triggers the error event on IE while it doesn't on webkit
so adding a check for the type of browser fixes the error.

See #549 for more details.
Merge pull request #556 from potomak/feature/fix-jshint-warnings

Fix jshint warnings

Missing semicolons, non-strict equality checks, confusing variable declarations, etc.
refactor Draggable code

This is more memory-efficient -- All helper functions only exist once,
not a separate copy for each draggable entity. It's also easier to read
(in my opinion).
Merge pull request #563 from sbyrnes321/drag

refactor Draggable code
Delete empty file
Merge pull request #565 from kevinsimper/develop

Delete empty file - JavaScript.js
CommonJS approach