A powerful typhoon has killed at least four people in the Philippines before passing over the capital, Manila.