Blender Game Engine Rigid Body Instability
You want something like this?


Notice the bottom right of the screen. I have locked the X and Z rotation for all the legs (Both upper and lower).

Alternatively, you could use this method, but it stiffens the joints so it's able to stand:



Notice that I have deselected the Angle X limiter. In addition, I changed the joint type to hinge for all upper limbs.

Alternatively, disregard the modifiers on your upper limbs, and assign them to the lower limbs instead using a hinge pivot like this if you don't want the stiffness of the previous solution:



Note that the hinge modifier only affects the LOCAL X axis, not the global. So you have to re-orientate the limbs like I did to get the local X axis pointing the same way as the global axis (Just for reference, they have to point directly 90 degrees out from your limbs.

If you look closely, you'll see a gap between the lower legs and the main body compared to the back legs. I made this quickly, so I didn't adjust to the 100% accurate values, but you have to tweak the Angle X min/max values to your liking. This will determine how far the legs are allowed to rotate along the X axis. Too high and the legs will go through each other, too low and the lower legs won't connect with the main body when it's laying down. Depending on your needs, these numbers will be different from the ones I gave you, but again, you have to tweak these to your liking. Again, these are local X values relevant to your upper limb.

This deals with your spasm issues.

Hope this helps. Let me know if this wasn't the answer you were looking for.