Wick theorem core preliminarily finished

The core function for the wick theorem, which contracts given orders,
has been priliminarily finished. Now we just need a driver to find add
the contractions and sum them up to get the actual product.