Bonaparte brought with him scholars and engineers who transformed Egypt, but his conquest of the region left thousands dead