An explosion has rocked the Egyptian consulate in the Libyan city of Benghazi, blowing out its windows and those of adjacent buildings.