Highly improved staggered quarks on the lattice with applications to charm physics