ok that gives me a couple of places to start.
1. first thing to check is the throttle shaft to see if its worn to the point where its binding in the plate in the bore. it can and will do the goofy stuff you have discribed.
2. brake switch it can do things given its condition that will make you chase your tail. the guts of it wear out and when peices start moving inside its tricky to trace.