Implement PDF export for graded Missions and Trainings

Resolves #260 
Oh yes, we have <code>db:populate_course_pref</code> to do that.   To implement new preference, I think there is no better way for now.

BTW, I noticed that the code are not rendered, here is one real sample of mission output: 
https://drive.google.com/file/d/0B0QWVhXU5uLQNkxjeWRkVkZya1k/view?usp=sharing

Other than this, it's fine