Foxconn, the Taiwanese technology giant, and HMD Global, a Finnish company, have signed a licensing agreement to revive the brand.