Curl-conforming hierarchical vector bases for triangles and tetrahedra