Heat the oil in a small skillet over medium heat. Sauté the onions until they are lightly browned, about 10 minutes. Preheat the oven to 300 degrees.
Meanwhile, in a medium bowl, mix together the pesto, lime juice, cheese and meat or avocado (optional). When the onions are golden, add them to this mixture.
Heat a large skillet (or two, to work faster) over medium heat. Add a tortilla to the pan, spreading a scoop of the mixture on half of the tortilla. Fold the tortilla, and repeat with a second tortilla, so two quesadillas are cooking at once, with their curved edges facing the outside of the pan.
After 3 – 5 minutes, when the bottoms of the tortillas are lightly browned and the cheese is starting to melt, flip them and lightly brown the second sides. When both sides are browned, remove the tortillas to a baking sheet and repeat with remaining tortillas and pesto-lime mixture (keep the cooked quesadillas warm in the oven until they are all cooked).
Slice the quesadillas in halves or quarters (a pizza cutter works well for this) and serve them with the salsa, if desired.