Apple Valley man killed in shootout with police