Role of sequence evolution and conformational dynamics in the substrate specificity and oligomerization mode of thymidylate kinases