Zawiya refinery shut down in 'precautionary measure' as emergency declared following explosions and gunfire nearby.