Thermomechanical variational principles for dissipative materials with application to strain localization in bulk metallic glasses