Optimization to SpriteSheet._calculateFrames

Signed-off-by: Grant Skinner <info@gskinner.com>