Chern characters and Hirzebruch-Riemann-Roch formula for matrix factorizations