Fixed issue with lost joings on rewriting of unions

* sparql_gp_detach_all_filters is extended with ability to extract
  detached filters from equivs
Fixed support of triple patterns of subtype OPTIONAL_L
Fixed missing initialization of variable
Fixed extraction of equiv restrictions as filters