Plans to bring trams back to Leeds and West Yorkshire, and deliver a multibillion-pound economic boost, have secured major government funding.