Arduino SoftwareServo by example
There seem to be 3 pins involved here: a potentiometer pin (0), an analog pin (val) and a servo pin (2). What is the purpose of each of these pins, and is this 3-pin wiring common across all/most servos?


No, there is only 2 pins.  The value of the potentiometer attached to pin 0 is read and stored in the variable val.  That is then used to set the angle of the servo motor on pin 2.


  Is there anything "wrong" with defining myservo.attach(2); up above the setup function, and leave the setup function an empty no-op function?


Yes.  It'll never get called.  setup() is the first function to be called and its purpose is to perform any initialization routines, such as attaching the servo code to the pin the servo is connected to.  So you have to call that either from setup() or from a function which setup() itself calls.


  Where does the map(...) function come from? If it was defined inside SoftwareServo I would have expected its usage to be something like SoftwareServo::map(...), etc.


map() is part of the standard Arduino API.  http://www.arduino.cc/en/Reference/Map


  Why do we need the delay after calling myservo.write(val);? What would happen if this delay wasn't in there?


You don't need the delay() call, but you don't want to set the value of the servo too rapidly.  You really want to allow at least one PWM cycle between each call to ensure the values have been set properly.


  According to that link, calling SoftwareServo::refresh() once every 50ms is necessary in order to: "keep your servos updating." But what does this mean, really? Updating to what?!?


SoftwareServo is just what it says - a piece of software.  You have to run that software for it to work, and the refresh() function is that bit that you run.  If you don't call that then the PWM signal for the servo will never get generated and nothing will happen.  

Oh, and yes those little servos should be fine.