Epidemics in Networks: Modeling, Optimization and Security Games