How the bail system in the US became such a mess — and how it can be fixed