Add composer file for easy dependency management

#756 against 3.2.1-wip branch per @davegandy request,  as original author seems to be inactive lately.