Fixed Bug: loopDuration could be wrong

The loopDuration could be higher than the sum of all durations when the
float had more than 3 decimal places.
Use int for animationInterval instead of long

With an integer a loopDuration of 24 days is possible which is more
than enough. Long is unnecessary big.
Merge pull request #2574 from HedgehogCode/master

Fixed Bug where AnimatedTiledMapTile sometimes couldn't find the correct frame