Improvements in AMSpaper related to algorithms.

- use algorithmicx
- \listofalgorithms works
Filter paper styles.
Isolate definitions common to all styles.