If a master tenant/landlord refuses a timely rent payment for the last month of residence because they asked a sub-tenant (me) to leave in the middle of a lease term because of a personal dispute not involving any breech of lease terms, and refuses to accept a timely rental payment for the last month, on grounds that I was over-staying the period they had granted to move out, can they, after I move out, keep my security deposit in payment of that last month's rent that they had previously refused?
If you believe that they did it wrongly you have the option of suing in small claims court to try to get it back.

I didn't read the rest of your post. TMI.

But based on the first paragraph I think you might have a chance at showing wrongful eviction.