Building a city on a forest square seems pointless to me. Rivers also offer a 50% defence bonus without penalizing your food and trade production.
In 99% of cases I only plant forests so I can cut them down and turn unproductive grasslands into plains. I will only occasionally keep a forest square with deer for the extra food unit, which will allow me to work one more ocean square or mine.
Very rarely, I will plant a forest under a fort, but I generally only build forts on hills and mountains. A fort in the open is a move of desperation and a rather ineffective one at that.
I do often build cities on hilltops, but that has more to do with reaching remote special resources rather than defence. Also, the 100% bonus is significantly better than the 50%, hills give you more food and, unlike forests, hills can't be terraformed into more productive types of land.
About the defence bonuses: they do stack, but not all of them, or at least the code says so. In particular, the 'fortified' bonus doesn't apply if the unit is inside a walled city or a fort. So a fortified unit in a fort gets a defence bonus of 100%, not 150%. Same with city walls--200%, not 300%. If we take your example--the veteran mech. inf. with a base defence rating of 9--and fortify it, we'll indeed get a defence of 13,5 (or thereabouts, as in order to do the calculations better, civ multiplies the values by 8, I think, then rounds numbers down. The formula is buried somewhere around here.). But if you fortify the same mech. inf. unit it in a fort (100% bonus) it won't get 27 defence, but rather only 18. Apparently, the thought behind this mechanic is that permanent fortifications supersede the temporary ones that armies can set up.
This also has a peculiar side effect: by fortifying and un-fortifying units in forts and walled cities you can, to a certain extent, control the order in which the units defend. Let's say you have a fort stocked with riflemen and mechanized infantry. Let's say you want to have the riflemen defend first so in the event of a successful enemy attack you lose your cheaper and obsolete units first. Fortify the riflemen and leave the mech. inf. unfortified. Technically, the mech. inf. are still better defenders, because the 'f' bonus doesn't apply inside the fort. The game, however, apparently takes the 'f' bonus into account when it decides which unit gets to defend first. Or maybe it just doesn't care that the stack is in a fort or a walled city. So, even though in this situation the riflemen have a strength of 10 while the mech. inf. have 12, the game sees things as if the units are in the open, with the fortified riflemen defending at 7,5 and the active mech. inf. at just 6, and lets the riflemen defend first.
With everything said, the best defence in Civ is offence. Instead of building forts in the open, have strong, fast attacking units in key cities and use them to destroy enemy units in the field before they can attack you. Chariots work great in the first half of the game. Later you can use catapults and cannons on rails until you get tanks and artillery. Cut down forests and jungles and occupy coastal and border hills and mountains with defenders. This makes killing enemy units even easier, as they can't land on rough terrain and use the defence bonuses themselves. Ideally, this way you'd only need walls in your coastal cities very late in the game, when the AI gets battleships. Speaking of which, get battleships and some cheaper sea units or fighters to scout for them and sink enemy transports. That is easier, safer and more effective than letting them land on your shores.