Each GP's unique ability (rush production, bulb a tech, etc.) is handled through an XML schema in the Units table. For instance, the Great Scientist has
<NumFreeTechs>1</NumFreeTechs>
which tells the game that this unit can be sacrificed to gain 1 tech; each other great person has a similar line (or two) for their own special ability. Engineers have BaseHurry=300 and HurryMultiplier=30, and the combination of these two tells the game how many hammers the engineer creates when it's sacrificed (30% of the rushed item's cost, plus 300 hammers, I think). Great Merchants are BaseGold=350, NumGoldPerEra=50 to determine how many gold you get from a trade mission (350 + 50*Era, where Era goes from 0 to 6); the amount of Influence it gets is set inside GlobalDefines. Artists get CultureBombRadius=1, which is pretty straightforward. The Great General's special ability to buff units is handled through a custom promotion (PROMOTION_GREAT_GENERAL), which unfortunately doesn't have any modifiable numbers associated with it and is just a promotion with the GreatGeneral flag set to true.
Likewise, the Golden Age ability of each person is handled through the
<GoldenAgeTurns>8</GoldenAgeTurns>
entry in Units, although that number is then modified by the game to adjust for how many golden ages you've already triggered. 8 is the base value for a GP. And finally, the ability of each GP to create a great improvement (Academy, Manufactory, etc.) is handled through an entry in the Unit_Builds table. For instance, the Manufactory is
Code:
<Unit_Builds>
<Row>
<UnitType>UNIT_ENGINEER</UnitType>
<BuildType>BUILD_MANUFACTORY</BuildType>
</Row>
</Unit_Builds>
In all three cases, you can give these abilities to other units, and the game will handle it perfectly fine, with one exception: each of these units has a special UnitAI for the custom ability (not the improvement or the golden age, those are handled by the default AI just fine); for example, the great merchant has UNITAI_MERCHANT that tells it how to do a trade mission. So if you want to give the mission ability to some other unit and have it know to use it, you'll have to give that unit the merchant AI as one of its options (preferably the main one) and depending on what the unit is supposed to do, that might not work well. For instance, that Merchant AI doesn't just tell the unit how to sacrifice to get gold, it tells it to move to a city-state's territory before doing it. Some people have used this to their advantage (the City-State Diplomacy mod's diplomat units use this code to move to city-state territory to perform their function), but if you're trying to make a combat unit that can also do a weak version of the Great Engineer's rush effect, that's not always so good.
Unfortunately, most of the custom effects are fairly hard-coded; you can't make a unit with a weaker culture bomb, you can't make a unit that gives half a free tech, and so on... unless you bring Lua into it, but doing THAT would require a huge amount of UI and code changes, depending on what you want to make the units do, and the AI would likely not know how to do what you wanted, even if you DID fix the interface so that the active player could use it.
--------------------
So there you go. You can make units that sacrifice to start golden ages, you can make units that can build a Manufactory (or, by creating a new Build action, units that SACRIFICE to build a Manufactory), and with an AI change, you can make units that rush production, do trade missions, sacrifice for techs, and so on. The game will handle it about as well as it does anything else; I've done some of these in my own mods, like adding a Golem unit that acts as a worker, has decent combat charaacteristics, and can sacrifice to rush production a bit in a city (basically giving the city the amount spent on the golem's construction). It works just fine.