On Dissipative Symplectic Integration with Applications to Gradient-Based Optimization