Finite-key security against coherent attacks in quantum key distribution