When you die in Don't Starve, an XP bar appears, telling you the progress to unlocking the next character.
How is this calculated? Is there a set amount of XP you get for each day you survive, or does it increase over time? Do you get XP for other actions, like killing monsters, crafting more complicated items etc.