Automatic Control of Standing Balance and Gait with Implanted Neuroprostheses