Ab initio study on electronic structure and magnetic properties of AlN and BP monolayers with Ti doping