Learning Hard Alignments with Variational Inference