Refactor: Topic#invite_by_email

Extract Topic#email_already_existas_for? and Topic#grant_permission_to_user
Fix failing spec due to missing variable in extracted method
Refactor: Topic#invite_by_email

Extract Topic#email_already_existas_for? and Topic#grant_permission_to_user
Fix failing spec due to missing variable in extracted method
Merge branch 'refactor-topic-invite-by-email' of github.com:cored/discourse into refactor-topic-invite-by-email
adds unit tests for Discourse.View
Refactored Topic#limit_topics_per_day to reduce code climate complexity

Extracted  1) #apply_per_day_rate_limit_for, method as generic
RateLimiter , 2) #limit_first_day_topics_per_day as a separate method,
3) Added User#added_a_day_ago?, 4) Fixed private methods indentation.
unit tests for Discourse.ContainerView
removes unused return statement from Discourse.ContainerView.attachViewWithArgs
increase default max_post_size to 32k chars
code sample is actually preformatted text
preformatted text help
logged in requests were being treated as anon, causing major havoc
Update client.zh_CN.yml
Merge pull request #1530 from velesin/view_tests

adds unit tests for Discourse.View
Merge pull request #1532 from velesin/container_view_tests

unit tests for Discourse.ContainerView
Merge pull request #1531 from railsaholic/topics_model_refactoring

Refactored Topic#limit_topics_per_day to improve Code Climate Complexity
Merge pull request #1535 from ofgeek/patch-1

Update client.zh_CN.yml
Merge pull request #1533 from velesin/remove_return_from_attach_view_with_args

removes unused return statement from ContainerView.attachViewWithArgs
Merge pull request #1495 from cored/refactor-topic-invite-by-email

Refactor: Topic model
Collapse user details when not viewing index view