Nanoelectromechanics of shuttle devices