Neural Networks for Modeling and Control of Particle Accelerators