The Vatican says the pontiff will remain in hospital "as long as needed" as he battles a respiratory tract infection.