I would have called this an allusion, though your sister’s second example (“and on the seventh day… she had a doughnut”) is probably closer to a paraproskodian.
As for the first (“to eat or not to eat”), according to Wikip., “snowclone” is the term for a well-known quote that provides a skeleton for cliched substitution. The best example is Shakespeare’s “To be or not to be”, where a speaker will humorously subsitute some other verb for be"; it’s done often enough that the substitution itself is a cliche. I’d also guess that for the SDMB, the tired Yakoff Smirnof reversal “In Soviet Russia, X Y('s) you.” is the most popular example:-)