Bending pins of HC-SR04
The easiest things to do if space is a premium is to unsolder (or cut) the pins and then solder directly the wire to the corresponding spots. 

Otherwise, you can also just get straight pins and replace them, You can also choose on which side of the board, as the holes are though it.

Lastly, about bending, it's doable with pliers if you want to make the pins face "forward" but depending on the quality of your pins they might break in the operation.