The first thing to realize is that notation and performance are different in Baroque, Classical, and Romantic music. The Romantic rules apply to Beethoven and later composers. The small squiggle (two zigs and two zags) means three notes, the first on the note, the second on the note a step higher (the "auxiliary note"), and the third on the note again. On the first note in measure 1, there are two small notes written out (probably the "leading grace notes" that you mention); Schubert has basically gone to the trouble of writing out the first few of these ornaments to show how he wants them played. Play the squiggles in the same way as these notes are written.
I see only a couple of "tr" markings in this sonata. Trills are a bit different; they run for the duration of the note. (In Romantic music, they also start on the main note; before Beethoven the usual practice was to start it on the auxiliary note.) In the case of these, there is a "tr" marking on a quarter note; tr with a long squiggle afterwards is generally to show a longer trill going over several other notes in a different voice. It's more of a reminder for the performer than a differing performance requirement from the simple tr marking. In the case of these quarter notes, try to fit five notes in. Some pianists like to divide the quarter into six, start with a rest, and play the same five notes. This gives an attractive little pause before the trill begins, and often will make the notes match up better with the notes in other voices.
As for your question about guidelines, the main one is that the trill should run for the duration of the note. How fast they are is often a matter of technical ability, but a reasonable guideline is to put at least two notes (one main note and one auxiliary) for each of the fastest notes in the accompanying voice. A very typical use of trill is to run a trill on the second scale degree while the left hand is doing some sort of V chord figuration, resolving the trill down to the tonic note (usually with a turn) while the left hand resolves to the I chord. Mozart's well-known C major sonata has a textbook example of this, at the end of the first movement. The left hand has an Alberti bass figuration in 16ths, so the trill should be 32nds. This is common to the point of being a cliche (Mozart regluarly used every cliche in the book and always got away with it; one of the reasons that he's great for studying basic theory) in the Classical period.