1, Use your highest level of melee militia as garrison, and keep as much as you can with free upkeep.

2, Forget about town militia in open battles. Use spear militia until you can get DFK; or even better hire all the mercenry spearmen you can get your hands on. They are much better than your average spearmen and will be your best troops till you get DFK.

3, Use high chivalry generals as govenors, they increase city/castle growth and that is what you want in the early stages. To get high chiv set taxes to low and build all churches you can.

Also, not all spearmen are defeated by cavs and it very much depends on the charge. If the cav unit cannot get a charge then even your spearmilitia will beat them handily. If it can even the better spears like merc spearmen or italian spear militia will suffer heavy casualties, but at least the better spears will win at the end.