40 killed in attack on police training center in Libya: mayor