Add tests for gradient in broadcastable cases

Also check shape of returned arrays in addition to value
Merge pull request #16 from lamblin/abergeron-fix_gpuadvsub1

Add tests for gradient in broadcastable cases