Correct how positions were managed.

Insert/Update have different rules depending on where the new/update buildpack needs to slot into.
Added testcases to cover the more basic insert in the middle.
Overall test cleanup, removed tests that no longer made sense, fixed ones that had misleading intent.
Merge remote-tracking branch 'origin/pr/190'

Signed-off-by: Matthew Sykes <matthew.sykes@gmail.com>