The prefectures have a tendency to do that when the duration of the contract extension is quite short...instead of giving you a new titre de séjour, they will just give you a récépissé until such time that you are able to show that you have a contract extension or have right to unemployment benefits (this is what the attestation pôle emploi is for). Technically, the préfecture should renew your right to stay in France for as long as you are entitled to unemployment benefits (I'm looking for a link to this, and I will edit my answer once I find it).
Regarding your questions:
How long can I remain in France after my after my titre de séjour and
récépissé have ended?
Technically, once your tds and récépissé have expired and you did not undergo a process for extension/renewal, you are considered to be overstaying.
If I can't remain at all, can I extend the récépissé?
Similar to what I mentioned above, you should be able to renew your récépissé to at least sign up for pôle emploi and get unemployment benefits (note that you cannot sign up with pôle emploi until AFTER your contract expires). Once you get that, you need an attestation from pôle emploi saying you get unemployment benefits, and then they extend your titre de séjour.
Just to be clear, you need to have been working and paying into the system for unemployment benefits for at least 4 months in order to be entitled to avail of said benefits.
Did they make a mistake in not granting me another titre de séjour?
Nope, I don't think so. With such a short period between the expiration of your current titre de séjour and the expiration of your current contract (3 months), they often just give a récépissé.
Hope this helps.