Put water in a large stock-pot. Add onion, garlic, lemon (lightly squeeze lemon into the water and then throw the entire lemon halves into the water as well), thyme, and bay leaves. Bring to a boil, then reduce heat and simmer about 5 minutes before adding shrimp.
Add shrimp and simmer about 2-3 minutes (depending on the size of the shrimp) or until the shrimp curls up and turns pink and is no longer transparent.
Quickly drain (discarding everything but the shrimp) and place the shrimp in a bowl to cool to room temperature.
Peel the shrimp (leaving the tail on if desired) and serve. If not serving immediately, refrigerate until ready to serve and remove 15-20 minutes prior to serving to allow shrimp to get to room temperature.
For the Cocktail Sauce:
Combine all ingredients and refrigerate until ready to serve.