A five-month rally in MediaTek looks set to extend as booming demand for smartphones and a promising new AI chip brighten the company’s outlook.