Avoid allocations in Ability class.
Avoid allocations in Ability class.

It won't change anything after they are first invoke, so add method cache to avoid allocations and avoid GC.

Benchmarks:

```
Calculating -------------------------------------
project_guest_rules without method cache
                        79.352k i/100ms
project_guest_rules with method cache
                        93.634k i/100ms
-------------------------------------------------
project_guest_rules without method cache
                          2.865M (±32.5%) i/s -     11.982M
project_guest_rules with method cache
                          4.419M (± 7.4%) i/s -     22.004M

Comparison:
project_guest_rules with method cache:  4418908.0 i/s
project_guest_rules without method cache:  2864514.0 i/s - 1.54x slower

Calculating -------------------------------------
project_report_rules without method cache
                        53.126k i/100ms
project_report_rules with method cache
                        97.473k i/100ms
-------------------------------------------------
project_report_rules without method cache
                          1.093M (±36.5%) i/s -      4.675M
project_report_rules with method cache
                          4.420M (± 7.2%) i/s -     22.029M
Comparison:
project_report_rules with method cache:  4420054.3 i/s
project_report_rules without method cache:  1092509.6 i/s - 4.05x slower
```

https://gist.github.com/huacnlee/b04788ae6df42fe769e4

LUMC/gitlabhq,htve/GitlabForChinese,larryli/gitlabhq,icedwater/gitlabhq,dwrensha/gitlabhq,mmkassem/gitlabhq,mrb/gitlabhq,martijnvermaat/gitlabhq,openwide-java/gitlabhq,dreampet/gitlab,SVArago/gitlabhq,dplarson/gitlabhq,mr-dxdy/gitlabhq,screenpages/gitlabhq,dplarson/gitlabhq,screenpages/gitlabhq,iiet/iiet-git,jrjang/gitlabhq,allysonbarros/gitlabhq,screenpages/gitlabhq,darkrasid/gitlabhq,mrb/gitlabhq,mrb/gitlabhq,yatish27/gitlabhq,LUMC/gitlabhq,stoplightio/gitlabhq,ttasanen/gitlabhq,iiet/iiet-git,axilleas/gitlabhq,icedwater/gitlabhq,SVArago/gitlabhq,mr-dxdy/gitlabhq,jirutka/gitlabhq,screenpages/gitlabhq,t-zuehlsdorff/gitlabhq,yatish27/gitlabhq,Datacom/gitlabhq,jrjang/gitlab-ce,openwide-java/gitlabhq,axilleas/gitlabhq,mrb/gitlabhq,LUMC/gitlabhq,LUMC/gitlabhq,axilleas/gitlabhq,dreampet/gitlab,jrjang/gitlabhq,jirutka/gitlabhq,jrjang/gitlab-ce,Datacom/gitlabhq,stoplightio/gitlabhq,stoplightio/gitlabhq,allysonbarros/gitlabhq,ttasanen/gitlabhq,shinexiao/gitlabhq,mmkassem/gitlabhq,shinexiao/gitlabhq,SVArago/gitlabhq,jrjang/gitlabhq,martijnvermaat/gitlabhq,yatish27/gitlabhq,duduribeiro/gitlabhq,dplarson/gitlabhq,duduribeiro/gitlabhq,htve/GitlabForChinese,mr-dxdy/gitlabhq,koreamic/gitlabhq,mr-dxdy/gitlabhq,Soullivaneuh/gitlabhq,martijnvermaat/gitlabhq,iiet/iiet-git,jrjang/gitlabhq,jirutka/gitlabhq,axilleas/gitlabhq,duduribeiro/gitlabhq,jirutka/gitlabhq,shinexiao/gitlabhq,icedwater/gitlabhq,openwide-java/gitlabhq,Datacom/gitlabhq,daiyu/gitlab-zh,mmkassem/gitlabhq,ttasanen/gitlabhq,htve/GitlabForChinese,jrjang/gitlab-ce,yatish27/gitlabhq,t-zuehlsdorff/gitlabhq,koreamic/gitlabhq,koreamic/gitlabhq,darkrasid/gitlabhq,icedwater/gitlabhq,daiyu/gitlab-zh,dplarson/gitlabhq,duduribeiro/gitlabhq,dwrensha/gitlabhq,daiyu/gitlab-zh,darkrasid/gitlabhq,allysonbarros/gitlabhq,SVArago/gitlabhq,stoplightio/gitlabhq,Soullivaneuh/gitlabhq,jrjang/gitlab-ce,Soullivaneuh/gitlabhq,koreamic/gitlabhq,t-zuehlsdorff/gitlabhq,larryli/gitlabhq,openwide-java/gitlabhq,dreampet/gitlab,iiet/iiet-git,mmkassem/gitlabhq,dwrensha/gitlabhq,dwrensha/gitlabhq,ttasanen/gitlabhq,larryli/gitlabhq,shinexiao/gitlabhq,darkrasid/gitlabhq,daiyu/gitlab-zh,larryli/gitlabhq,Datacom/gitlabhq,htve/GitlabForChinese,Soullivaneuh/gitlabhq,allysonbarros/gitlabhq,martijnvermaat/gitlabhq,dreampet/gitlab,t-zuehlsdorff/gitlabhq