hevc: use templates to declare mc qpel functions