Refactor student and student_membership model

Minor things related to Rails 4 and style cleanup.
Use 2 (not 3) spaces for indentation.