Low-energy pions in nuclear matter and ππ photoproduction within a BUU transport model