PBzeer is correct about setting aside about 20-30 percent of your budget for upgrades and refits....this is true regardless of whether you're buying a new boat or a used one btw.
As for boats... it really depends on the type of sailing you plan to do with the boat, and the area you plan to sail in. What maybe a great boat for daysailing on San Francisco Bay, may not be so suitable for gunkholing in the Florida Keys. Once you've narrowed the boat choice down, by what kind of sailing you'll be doing, then narrowing it down to the best out of the possible candidates is relatively easy.
As for gas vs. diesel... it depends a lot on the boat. A good Atomic gasoline engine that has been well maintained is worth much more than a poorly maintained diesel with low hours.
Gasoline is a perfectly safe
fuel if used properly, and gasoline engines are generally a bit easier and cheaper to maintain IMHO.
Also, some people prefer having only one
fuel aboard, and if you use a gasoline powered outboard for the
dinghy, then a gas-powered engine for the main boat simplifies some things.
However, with the current push for ethanol-blended
fuels in the US, I would say that you're probably better off with diesel as a
fuel. The ethanol-blends are not as stable as the older MTBE-based gasoline blends and have some serious issues in a marine environment. The E20 blends now showing up are actually damaging to marine engines...and the ethanol is causing problems with the fiberglass
fuel tanks on older boats.
Just my $.02 worth.