records: display tabs

* Creates a new `record.tabs` menu using Flask-Menu.

* Adds the `visible_when` attribute and the `count` keyword argument.

* Amends the main `record` template.

* Memoizes the function for finding the `visible tabs`.  (closes #1646)

Signed-off-by: Eirini Psallida <eirini.psallida@cern.ch>