Practical aspects of measurement-device-independent quantum key distribution