JavaScript version of HappyNumbers in 96 chars