Analysis of Mode Locking in Quantum Dot Laser Diodes: a Time-Domain Travelling-Wave Approach