Wales forward Gareth Bale has joined LAFC on a 12-month contract, with options through to 2024, after his departure from Real Madrid.