A burglar who targeted businesses and student accommodation buildings in Preston has been jailed.