Queue-Aware Performance Optimization of Heterogeneous Networks