Fast multipole method for micromagnetic simulation of periodic systems