Odd you should ask this, as I was looking at the same thing the other week!
The leader associated with a civ affects six things - Leader Name, Leader Personality, Traits, Biases, Flavours and Strategies
Name, Personality, Traits and Flavours are all cached against the player object as the game starts.
Biases aren't cached in the player object, but pulled from the db cache as needed.
Strategies, although cached as turns progress, will update at the end of the turn that flavours are altered.
Leader Name can be changed via a Pregame method
Leader Personality is the same as Name and doesn't appear to be used (there's even a comment by a dev in the C++ code querying whether it can be removed)
Traits can be swapped by using a hidden tech - make it a prereq for the new leaders traits and obsolete the old leaders traits
Which just leaves flavours. There is no way to change these from Lua, setting a new leader name is not enough as that doesn't affect the cache.
HTH
W