get_bvr_ref refactoring

Refactoring of the get_bvr_ref function to be more modular.

This is because we need to add other generation condition and strategy for LSV.

Initial MP is https://code.launchpad.net/~compassion/openerp-swiss-localization/lsv_prepare/+merge/229767