There are some ROM's that can be installed with locked bootloader, such as this one:
This particular ROM is for JB 4.2 that only XM DS comes with, you'd need to flash C2005 15.2.A.2.5 firmware first.
But after testing most of the ROM's available for Xperia M (even these for unlocked bootloader), I've came to the conclusion, that stock 4.3 is still the best for everyday use. It runs smooth as a butter on my device and you don't need to sacrifice anything for performance.
So here is what I would have done:
1.Make sure to back up everything that you need, because all of the data stored on the internal memory will be lost.
2.Change the firmware of your phone with a Flashtool. I'm assuming that you are still on 15.1.C.2.8 firmware that comes out of the box, in that case, download the 15.4.A.1.9 firmware from this thread:
Its a .ftf file, flash it using Flashtool, there are a lot of guides out there how to do that, the process is very similiar if not identical between Sony phones.
3.Root and deodex (if you need to) your phone using guides for JB4.3 on this forum. Optionally, you can install Greenify, which further increases the performance, but if you use only a few apps, there is not much point in that, it won't make much of a difference.
That's about it in terms of making it run smooth, at least I can't think of anything else.
My phone runs smooth on Stock 4.3 even with quite a few apps installed., if yours still doesn't (it lags, freezes, reboots), there is probably something wrong with the phone itself and it should be sent for a repair.
Best of luck.