Boundary element generator

This changeset aims to provide a tool to extract boundary elements from an existing domain mesh. The boundary elements will be used when we applying 2nd and 3rd boundary condtions (i.e. we need to integrate shape functions over boundaries).
Also here I would suggest to make a standalone function (because of relatively deep nesting following) for a check of an edge being a part of a poly.