Comprehensive model for quantum dot superluminescent diodes and lasers