A court in Germany has upheld a ban on the sale of Samsung's Galaxy Tab, saying it infringes the designs of American rival Apple.