[#31727] Migrate application classes from legacy JApplication to JApplicationWeb (Fix #1716)