Why do you need a Sigma 17-50mm lens? It pretty much gives you the same coverage as your Canon EF-S 18-135mm lens, but just has the faster speed of a 2.8 aperture. Are you shooting a lot of low-light photography that you will need the faster 2.8 aperture? Or are you looking to upgrade for image quality and sharpness?
I have the 28-105mm f3.5-4.5 lens. It is pretty much my workhorse lens. It is an older, film camera lens, and the image quality certainly does not compare to the EFS-18-135mm STM lens. I'm looking at upgrading that lens to a Canon EF 24-105mm f4L lens. If you are thinking about upgrading for image quality and sharpness, then sell both your 24-105 and 18-135 lenses to fund the purchase of either the Sigma or Tamron medium zooms.
The Canon 24mm STM is a pancake lens. It is a small, lightweight lens for wide angle shooting. As Mcoren said, it is a perfect "just in case" wide angle lens that is lightweight and takes no space. I use the 24mm STM if I want to shoot with a three-prime lens kit of 24mm STM, a 50mm STM, and either an 85mm / 100mm macro with a single camera body in a compact messenger bag.
If you really love the nifty fifty, have you thought of investing in a three prime setup of a wide angle, your nifty fifty, and a prime telephoto?