Refactored pore_species and chain_species into polymer_species

This simplifies the implementations of both polymer species functions
into a single function, where the closed/open status of the polymer
(i.e., pore or chain) can be specified using an argument to the
function, closed=True/False.

Because this involved changing the bond numbering scheme for pore
species, this required updating the doctests for the pore
assembly/transport etc. macros as well. Currently all doctests in the
file pass.
Refactored assemble_pore/chain into assemble_polymer

The code was almost completely identical between these two functions
other than the call to chain_species vs. pore_species. The refactored
function calls polymer_species and specifies closed=True/False.

Note that I also moved some code around to maintain a logical ordering.