checking for Item#in_stock? considering also the contract_lines assigned but not yet handed over

Squashed commit of the following:

commit fc07cdf748e8a61b3bc4409b3043ca40495a4cbd
Author: Franco Sellitto <franco.sellitto@zhdk.ch>
Date:   Mon Jul 28 12:40:48 2014 +0200

    [FIX CI]

commit dd8af6289dc8c05f2370e59bf1833c7e143a513c
Author: Franco Sellitto <franco.sellitto@zhdk.ch>
Date:   Mon Jul 28 12:05:42 2014 +0200

    checking for Item#in_stock? considering also the contract_lines assigned but not yet handed over