No matter what you do next you need to take an exit even if you have an NOC. Any new visa will warrant you to re-enter Qatar to be valid. You will have to go through the same rigmarole of medical, finger printing etc. as you did the first time you entered Qatar.
I think the first thing that you need to do is to find a job and ask your employer to take responsibility of your outstanding loan. Of course your new employer has to trust you.
Good Luck