Major implementation change to detfields

Fields now use a more logical SQL schema. Two tables: one for listing
fields and one for listing log entries with a new column that binds a
log entry to a specific field.